Closed xmadscientist closed 2 years ago
I think the product form is missing the input with the name="id"
.
What does the input with the name="id"
do? @EvgeniyMukhamedjanov
Each product form must have an input with the name="id"
:
https://shopify.dev/themes/architecture/templates/product#the-variant-selector
even if there is no variants (only Default variant).
@EvgeniyMukhamedjanov I see it being rendered on my product page:
Yeah, I see.
Can you shift the data-ajax-cart-section
from the form
element to the element with the cart_content_ajax
class so that you always have the same amount of the data-ajax-cart-section
attributes in your cart?
Now you have two attributes if the cart is not empty, and only one data-ajax-cart-section
attribute if the cart is empty.
@EvgeniyMukhamedjanov I tried that and couldn't get it to work. I ended up building my own cart update trigger on ATC button clicks and now it works. Closing this issue now.
Our product form uses a button that sends a post req to cart/add. I am having a really really really hard time getting my data-ajax-cart-section to refresh after anything is added to the cart...
In the cart itself, the data-ajax-cart-section updates work perfectly when adjusting quantities, however.
Does anyone know what the cause might be?
Site: https://olsatools.com/products/magnetic-socket-holder?variant=39430920437811