Impulse theme, ajax cart drawer, show total savings next to subtotal

In the slide cart - ajax on the impulse theme

https://themes.shopify.com/themes/impulse/styles/modern

In the ajax slide in cart, i want to have “you saved $XXX” under subtotal. It needs to work and update if they change the qty btn in the cart, not just on page refresh. I know html but ajax is confusion. Please show the i need to add.

Also, is it possible to have the number of items in the cart change live / ajax on the cart symbol - top right ?

again liquid and html is fine, but it needs to change live / ajax. Need the

thank you very much for your help

1 Like

Cart counter can be ajax auto update see this video and reference

https://www.youtube.com/watch?v=5Dl9Wsmq130

which references

https://liquid-ajax-cart.js.org

Super thank you to

Evgeniy Mukhamedjanov

the “you have saved $X” ajax cart is still hard work, pls help ?

@mrsingh1

can you please send screenshot or video further issue

1 Like

I would like to have in the slide out ajax cart the “saved $300” which is the difference between all the compare prices and the sale price. Its a total saved, and changes as qty is changed in the Ajax cart.

please help

1 Like

@mrsingh1

thanks it can be done customization

1 Like

I added …

{% assign total_saving = 0 %}
{% for item in cart.items %}
{% if item.variant.compare_at_price > item.variant.price %}
{% assign saving = item.variant.compare_at_price | minus: item.variant.price | times: item.quantity %}
{% assign total_saving = saving | plus: total_saving %}
{% endif %}
{% endfor %}
You Saved: {{ total_saving }}

but that only updates the “you saved” on page refresh, can you show me the code for AJAX that changes the “saved” as the QTY btn change in the slide cart.

Using theme that is demo

https://themes.shopify.com/themes/impulse/styles/modern

it has huge ajax library, maybe use something from

https://liquid-ajax-cart.js.org

which is also loaded. Add here to help the community too, thank you Sir

1 Like

Can someone please help this man? Having the same problem

1 Like

@Stevencoding

oh sorry that issue please share more detais;

Using impulse theme and want to add total savings above the subtotal on the cart page. Please see https://prnt.sc/6rHSNVTGkHPT

Hi just following this up