Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating cart not updating on add to cart #67

Closed
doideaco opened this issue Jun 5, 2023 · 6 comments
Closed

Floating cart not updating on add to cart #67

doideaco opened this issue Jun 5, 2023 · 6 comments

Comments

@doideaco
Copy link

doideaco commented Jun 5, 2023

Playing with the library in a clean theme, displaying the floating cart produces inconsistent results when adding to cart.

Seems data is not updating, needs a refresh to see changes.

Browser: Safari 16.3 Mac

@EvgeniyMukhamedjanov
Copy link
Owner

Can you share a preview link and steps to reproduce the issue?

@doideaco
Copy link
Author

doideaco commented Jun 5, 2023

Sure let me clean up the preview. Will send shortly

@doideaco
Copy link
Author

doideaco commented Jun 5, 2023

https://hhckl444oj1c2gcx-76794134825.shopifypreview.com/products/ruffled-cushion-medium

pass: iadeeg

Minimal layout and styling for testing. Just use product page as standard. Add product variants, check side cart updates, try updating quantities in side cart. Check cart preview updates at top of screen.

@doideaco
Copy link
Author

doideaco commented Jun 5, 2023

Also noticed plus/minus buttons don't function either

@EvgeniyMukhamedjanov
Copy link
Owner

This is happening because your cart isn't inside a Shopify section.
Liquid Ajax Cart uses Shopify Sections API to update the cart's content, which is available only if you put your content in a Shopify section.
So to fix that -- create a new shopify section and make sure that the element with the data-ajax-cart-section attribute and all its children is inside the section.
image

@doideaco
Copy link
Author

doideaco commented Jun 5, 2023

Awesome this solves it. Thank you

@doideaco doideaco closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants