Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to hide checkout buttom if cart.total_price is under $2000. I could do it with a liquid conditional in cart-template.liquid, so when user goes to his cart and its total is under $2000, checkout button is hidded. My problem is that I know that in this solution a page refresh is needed. I want to hide or show checkout button when user increase or decrease a cart item quantity without refresh the page. It's that posible? I am using Debut theme.
Hi, @flaquitqm.
You could achieve that using the AJAX Api for the cart.
https://shopify.dev/api/ajax/reference/cart
Hi @flaquitqm ,
You have to edit cart.js find the below line
fetch(`${routes.cart_change_url}`, { ...fetchConfig(), ...{ body } })
and write your condition in its success state.
Hope it helps...
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025