Auto Update Cart Page & Updating From .. For Price

New Member
3 0 0



We hope to increase conversion on our store by updating our Cart page.

This is our examplestore:


How to improve the conversion?

1-  Remove the Update Cart button:

(So far, pretty easy, since we only had to remove this line of code)

<button type="submit" name="update" class="btn--secondary update-cart">{{ 'cart.general.update' | t }}</button>

2- Add a script to auto update your Cart page:

(so far, so good. Just add this script)

$('.qty-input').on('change', function(){
var prev = $(this).data('val');
var current = $(this).val();
setTimeout(function() {
if (prev != current){
$( "#cart_update" ).trigger( "click" );
}, 500);

3- Make sure the from .. for price also change, after updating the quantity.

(the hard part, where we hope to get some help)


This is the code we have in our Cart.liquid. Can someone please tell us how to update the compare price. Is it possible to edit this piece of code, to make sure our compared price is multiplied by the quantity of the cart.


For example:

1 piece from € 70,- to € 35,-

2 pieces from € 140,- to € 70,-


                  <div class="grid__item two-thirds text-right">
                    {% if item.variant.compare_at_price > item.line_price %}
                      <small class="cart__price cart__price--strikethrough">{{ item.variant.compare_at_price | money }}</small>
                    {% endif %}

                    <span class="cart__price">
<span class='revy-cart-line-item-price' data-product-id='{{item.product_id}}' data-variant-id='{{item.variant_id}}' data-key='{{item.key}}'>
<span class='booster-cart-item-line-price' data-key='{{item.key}}'>{{ item.line_price | money }}</span>

                    {% assign discounts_size = item.discounts | size %}
                    {% if discounts_size > 0 %}
                      {% for discount in item.discounts %}
                        <small class="cart__discount">{{ discount.title }}</small>
                      {% endfor %}
                    {% endif %}

I really would appreciate the help.


Thanks in advance.


New Member
2 0 0

Hi There, 


This is the exact thing i want to implement on my store, did you find any solution to this? If you did, then it'd be great if you could share the solution. Hoping for a quick response from your end, thanks !