Dynamic checkout button disappears after update (with data-ajax-cart-static-element applied) #62
-
First of all, thank you for the work you've done. I managed to make the 98% of my lateral cart in about 15% of the estimated time because of how easy and well-documented it is. I have, however, a few questions and I will address one of them here. I have some dynamic checkout buttons. Their content and logic are loaded through a third party app. I copied this bit from the cart page without changing classes in order not to break any selectors. Re-rendering of these buttons on each cart update would usually take up a good few seconds and was visibly noticeable (and makes the whole experience less smooth), which is why I added the When the section loads for the first time, everything is fine, we can see that the three buttons are appearing. With every new re-render of the cart one of the buttons (always the same one) for some reason disappears. All the requests related to PayPal or dynamic checkout are OK. I'd like to understand why this could possibly be happening. Am I doing something wrong? Or is there something happening when the PayPal button interfieres with what Liquid ajax cart is trying to do. If you think it's not something I can possibly solve, I would be very grateful if somebody could give me some ideas how to work around it. Thank you! You can find the url to the dev theme where I'm currently working on this feature here. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hey @sofiaborovskaia, I'm really happy that Liquid Ajax Cart could be helpful for you :-) |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer @EvgeniyMukhamedjanov! |
Beta Was this translation helpful? Give feedback.
-
@sofiaborovskaia |
Beta Was this translation helpful? Give feedback.
-
@sofiaborovskaia I completely forgot, I had the similar issue with another app that used iframe. So I think what can help is removing the payment buttons row from the
The issue is it is not possible to detach and attach iframe back (this is how static-element works) while re-rendering. |
Beta Was this translation helpful? Give feedback.
@sofiaborovskaia I completely forgot, I had the similar issue with another app that used iframe. So I think what can help is removing the payment buttons row from the
data-ajax-cart-section
completely:The issue is it is not possible to detach and attach iframe back (this is how static-element works) while re-rendering.