Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello, I have added the below logic to my cart based on the item vendors as follows. This code works fine for the regular cart page but I also have an ajax cart using code similar to https://github.com/Shopify/Timber/blob/master/snippets/ajax-cart-template.liquid. If I try to add the below code to this template, the items do not update without a hard page refresh. Can anyone tell me how to access the cart items in javascript for the ajax cart, similar to what I've done below?
{% assign isGlobalShipAvailable = true %} {% for item in cart.items %} {% if item.vendor == 'SOME_VENDOR' %} {% assign isGlobalShipAvailable = false %} {% endif %} {% endfor %} {% if isGlobalShipAvailable %} DO_SOMETHING {% endif %}
Well I dug into this some more and I have a better handle on it (no pun intended) but I need to dig into handlebars.js and I think I can make something work.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025