All things Shopify and commerce
Hello!
We are building a custom UI on top of Shopify backend and having issues with 'Add to Cart' from our PDP. Clicking the button doesn't appear to do anything, but once we refresh the page we see that the product actually did add to the cart correctly. We have not made any changes to the cart or checkout flows, so we're not sure what the issue is. Using AJAX add API to add the product variants.
Any help appreciated!
Hi @mraman
The thing is that the product is getting added to cart but the popup or drawer is not opening. In ajax in success add the code to open cart or cart drawer
Is there an example I can see for open cart / cart drawer? I'm not so sure that will work because when we open the cart drawer after clicking 'Add To Cart' there still isn't any product in there, we have to refresh the page to see it.
Which theme are you using?
We're building a custom UI on Lorenza theme
Currently the only thing that works is reloading the whole window. We've tried getting / refreshing the cart only after adding to cart, doing a get on the cart before opening it (toggle), getting the cart info and displaying the data. In this last case interesetingly when we do a get we see that the product was added to the cart, but it's not displaying in the updateCartDrawer() for some reason.
Any and all guidance is much appreciated!!
I'm having this issue now, were you able to find a solution?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024