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

Integration with Barba.js #104

Open
JoeriE opened this issue Aug 29, 2024 · 2 comments
Open

Integration with Barba.js #104

JoeriE opened this issue Aug 29, 2024 · 2 comments

Comments

@JoeriE
Copy link

JoeriE commented Aug 29, 2024

Hi,

We would like to use liquid ajax cart together with Barba.js..
Is there a way to re-init everything after a page transition? So that the correct data is fetched.

Best wishes,
Joeri Evers

@EvgeniyMukhamedjanov
Copy link
Owner

Hi Joeri,
Barba.js is kind of PAJAX way to navigate between pages?
I've never tested Liquid Ajax Cart with that but I don't see any reason it wouldn't work.
Do you have any test theme with Liquid Ajax Cart and Barba installed to see what issue you are facing?

@EvgeniyMukhamedjanov
Copy link
Owner

If you want to force Liquid Ajax Cart to reload data from Shopify, you can run an empty POST update.js request by doing this:
window.liquidAjaxCart.update();
It will send an empty update request to Shopify and Shopify will return current cart state and cart related sections HTML.

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