Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Greetings, I want to add a Quick Add option to a product page.
Allow user to add a different product to cart from one product page.
I have succeeded in doing so using this post and accepted solution: https://community.shopify.com/c/shopify-discussions/quick-add-adding-variant-to-cart-in-one-click/td....
However, when I add product and correct variant to cart this way cart's content doesn't change.
But when I add a product using a "regular" add to cart button, or when there are products in cart and I remove one of them, the quick added product appears in cart.
So, basically the functionality is working, but not in "real time" and user needs to manually update cart before being able to see added products.
I am guessing there is a simple jquery, ajax, js solution, but I'm kinda newbie with these, so any help is much appreciated.
Functionality is not yet live, so I hope this theme preview will do the trick: https://xmcts6l2ibyu403k-1440652.shopifypreview.com