Dawn theme reload cart on quantity update

Hi,

I’m upgrading a site to Shopify 2.0 and I need to reload the Cart page in the Dawn theme when the quantity is changed.

Reason: I currently disable the checkout button and add a message if the cart value is less than £100:


```markup
{% if customer.tags contains 'wholesale' and cart_price < 10000 %}
  

Minimum Wholesale Order is £100.00. To view the check out button please increase your order value.

{% endif %}

In Dawn, because the cart total is dynamically updated when the quantity is changed, the above liquid scripts don’t run.

Solution anyone?

Thank you!

Hello @Rich_Woodward ,

Go to Assets => Cart.js and add the below code inside updateLiveRegions function,

window.location.reload();

Next, Go to Sections > main-cart-footer and add your script.

I hope it helps you.

Happy Coding!!

Thank you very much for the solution - works perfectly for my needs.

Thanks a lot SheetalZadfiya, it works great!

Hi

Would adding the code:

window.location.reload();

Enable the cart to reload when the customer changes the quantities in the cart. Currently when a customer makes an adjustment, the cart doesn’t update the totals including the discounts for volume purchases. If the customer simply refreshes the page it works well but I don’t want the customers to have to refresh and it automatically updates when they make the changes.

Thanks in advance