Hello Everyone,
I am currently facing a little challenge here :
I succeeded adding a form to my products on the collection page, with a quantity selector, variant selector and Add to cart Button, so the customer can actually do their shopping through a list.
Only problem now : Unlike on a product page, adding a product to the cart doesn’t automatically refresh the cart drawer, a manual refresh is needed to do so.
An idea anyone ?
My Shopify theme is Express.
https://archipel-distribution.myshopify.com/
PW : graeffe71
Thank you for reading me.
Hi @Archipel ,
Password incorrect, please resend me the password, I will help you to check it
Hello @LitCommerce ,
This is the password for entering the webpage, not the Shopify admin interface, is this what you meant ?
My bad, password actually is : graefe71
one “f” and not two.
Hi @Archipel ,
Please go to ajaxify-cart.liquid file and change code here:
You just need to re-declare it, everything will show up fine
Hi @LitCommerce !
Thank you so much,
I just don’t quite understand : what do you mean by re-declaring it ?
Hi @Archipel ,
Before that it was declared with ID, then I changed it to data, which is correct name of display count.
You can check the previous version to notice the difference. Refer https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code#roll-back-to-an-older-version-of-your-theme
Hope it is clear to you.
Hi @LitCommerce ,
I saw the change yes, the count is now changing when a product is added, but the content of the cart-drawer (item count) and the price (subtotal) isn’t updated when I open the cart drawer, only the counter on the cart icon…almost there. Is there something I should add in the code to correct this ?