-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Liquid Ajax Cart: the HTML for the "sections_url" section was requested but the response is null #95
Comments
@edoardolunardi |
Hey @EvgeniyMukhamedjanov, thanks for looking into this. ![]() |
Hey @EvgeniyMukhamedjanov, sorry to bug you, did you have another change to take a look? 🙏 |
Hi @edoardolunardi. |
Hey @EvgeniyMukhamedjanov, after banging my head on this for hours and hours, I finally realized the culprit is an app, in my case this one https://apps.shopify.com/freegifts. This app is adding some products to the cart automatically, and somehow it messes up the ajax cart. Still not sure how I'm gonna approach this with the client, in the meantime, does it ring any bell? Thank you! |
@edoardolunardi Basically Liquid Ajax Cart has methods to build any kind of automatic adding/removing items to/from the cart. You just need to add some fields for the client where they will be able to chose which product is a gift. Also the discount set up will be on you as well. If you decide to use Liquid Ajax Cart API to automatically add/remove items then check this doc: |
Thanks @EvgeniyMukhamedjanov! Out of curiosity, do you have any idea why that app might cause issues with the ajax cart? The client is gonna have one app doing cart upselling as well as showing bundles in the cart when a specific product is added, is there a change this app will also mess it up? |
@edoardolunardi Most likely you'll see a trace of this app within each cart ajax request as well on your website. Unfortunately I don't see any dev doc that explains how to change the app behavior. Actually why did you decide using Liquid Ajax Cart on your project? Do you have a lot of cart customization? |
Yeah that makes sense. So at this point it sounds like the ajax cart is not really suitable for these cases correct? (assuming the theme offloads all the cart logic to the backend through apps). |
@edoardolunardi But now I see that the gift app modifies the behavior of frontend requests and if you must use the apps, then you have no choice I guess. |
@EvgeniyMukhamedjanov thanks, then I guess I have no choice but remove the liquid-ajax-cart :/ |
@edoardolunardi But in addition to that it automatically scans all the sections on the page that should be updated after each request (data-ajax-cart-section) and modifies the request to also ask Shopify to return updated HTML for those sections using this API: Also Liquid Ajax Cart provides ready components for product add-to-cart form, qty controls etc. So for me it is difficult to say at what point the gift app conflicts with the Liquid Ajax Cart logic and I can't guarantee that you won't face the same issue unfortunately. Do you have any website with the gift app install and liquid ajax cart installed? Maybe a dev website that you can share? I would be able at least find the reason. Also did you try contacting the app developers? Sometimes they might check why the issue happening and suggest a fix or fix it by themselves? |
@EvgeniyMukhamedjanov thanks for the support.
My goal would be to stick with the ajax cart since it abstracts logic away that otherwise I would need to implement manually, but I need to make sure it's not gonna break when the client adds apps that can modify whatever is in the cart. I will keep you posted! Thank you. |
Hey @EvgeniyMukhamedjanov, the free gifts app works with the default dawn theme ajax cart, this means something is off in the liquid-ajax-cart library. I coded my custom ajax cart in the end. This can be closed 👍. Thanks for the support! |
Hey, I'm having a couple of issues with the cart.
When I add a product to the cart, I get this error in console:
However, I'm able to add the product and open the cart.
The issue is that let's say I add 5 products, the quantity input shows a wrong value, but the
input value
in the dom is correct (on page reload, everything looks okay).Same error I get when I try to update the line item quantity from the cart.
Another I error I get when I add a product with a selling plan to the cart is:
Same as above, the item is added to the cart, but the selling plan is empty. It works upon page reload.
I can't quite figure out what's wrong, any help is appreciated! Thank you.
The text was updated successfully, but these errors were encountered: