How can I update the cart when product amounts are manually modified?

When viewing cart, if the product amounts get modified manually, the user gets stuck.

It is asked, “Cart needs to be updated” but it’s not a button for it.

Can you please advice how to sort this?

@LauraLopez ,

If your cart is an ajax cart it should do this dynamically, otherwise you would have an update button. It would be good to share the URL of store so someone can check.

Hi,

I’m not sure about the ajax cart, how can I know about this?

There is not an update cart button.

Here link to site; https://plaato.io/cart

@LauraLopez ,

Did someone make any change in the code recently? the option to update is removed and cart is not supporting ajax. If this was working earlier, then you may revert to the last working version or take a fresh copy of the theme.

Another option is to hire an expert to troubleshoot this issue.

I have reset the theme, and in there this function works. It gets update automatically.

So on the file cart-template.liquid

this is the code now:

{{ 'cart.general.title' | t }}

{% if cart.item_count == 0 %}

{{ 'cart.general.continue_browsing_html' | t }}

{% else %}

{{ 'cart.general.products' | t }}

{% for item in cart.items %}

{{ item.product.title }}

{% unless item.product.has_only_default_variant or item.variant.title contains "Title" %}

{% for option in item.product.options %} {% unless option contains "Title" %} {{ option }}: {{ item.variant.options[forloop.index0] }}
{% endunless %} {% endfor %}

{% endunless %}

{% if item.properties %}

{% for p in item.properties %} {% unless p.last == blank %} {% if p.last contains '/uploads/' %} {{ p.first }}: {{ 'cart.general.uploaded_file' | t }}
{% else %} {{ p.first }}: {{ p.last }}
{% endif %} {% endunless %} {% endfor %}

{% endif %}

{{ 'cart.general.price_per_item' | t }}: {% if item.line_level_discount_allocations.size > 0 %} {{ item.final_price | money }} {% endif %} {{ item.original_price | money }}

{{ 'cart.general.quantity' | t }}: 0 and item.variant.inventory_policy == "deny" %}max="{{ item.variant.inventory_quantity }}"{% endif %} />

{% if item.line_level_discount_allocations.size > 0 %}
{% for discount_allocation in item.line_level_discount_allocations %}

{{ 'cart.general.discount' | t }}: {{ discount_allocation.discount_application.title }} (- {{ discount_allocation.amount | money }})

{% endfor %} {% endif %}

{{ 'cart.general.total' | t }}: {% if item.line_level_discount_allocations.size > 0 %} {{ item.final_line_price | money }} {% endif %} {{ item.original_line_price | money }}

{{ 'cart.general.remove' | t }}



{% endfor %}

{% if cart.cart_level_discount_applications != blank %}

{{ 'cart.general.discount' | t }}

{% for discount_application in cart.cart_level_discount_applications %}

{{ discount_application.title }} (- {{ discount_application.total_allocated_amount | money }})

{% endfor %} {% endif %}

{{ 'cart.general.subtotal' | t }}

{% comment %} {% endcomment %}

{{ cart.total_price | money_with_currency }}

{% comment %} + {{ 0 | money }} {{ 'cart.shipping_calculator.estimated_shipping' | t }} {% endcomment %}

{% comment %} Tax and VAT not included {% endcomment %}

{% if settings.show_multiple_currencies %}

{{ 'cart.general.orders_processed_in_currency_html' | t: currency: shop.currency }}

{% endif %}

{% if section.settings.display_special_instructions %}
{{ ‘cart.general.note’ | t: shop_name: shop.name }}:

{{ cart.note }}

{% endif %}

{% if settings.display_tos_checkbox %}

{{ settings.tos_richtext }}
{% endif %}

{% if content_for_additional_checkout_buttons %}

{{ content_for_additional_checkout_buttons }}
{% endif %}

{% if cart.item_count > 0 and section.settings.display_continue_shopping %}

{{ 'cart.general.continue_shopping_link_html' | t }}

{% endif %}
{% endif %}

{% schema %}

{
“name”: “Cart page”,
“class”: “cart-section”,
“settings”: [
{
“type”: “checkbox”,
“id”: “display_continue_shopping”,
“label”: “Show "continue shopping" link”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “display_special_instructions”,
“label”: “Show "note" text box”
}
]
}

{% endschema %}

this is the code on the template reset:

{{ 'cart.general.title' | t }}

{% if cart.item_count == 0 %}

{{ 'cart.general.continue_browsing_html' | t }}

{% else %}

{{ 'cart.general.products' | t }}

{% for item in cart.items %}

{{ item.product.title }}

{% unless item.product.has_only_default_variant or item.variant.title contains "Title" %}

{% for option in item.product.options %} {% unless option contains "Title" %} {{ option }}: {{ item.variant.options[forloop.index0] }}
{% endunless %} {% endfor %}

{% endunless %}

{% if item.properties %}

{% for p in item.properties %} {% unless p.last == blank %} {% if p.last contains '/uploads/' %} {{ p.first }}: {{ 'cart.general.uploaded_file' | t }}
{% else %} {{ p.first }}: {{ p.last }}
{% endif %} {% endunless %} {% endfor %}

{% endif %}

{{ 'cart.general.price_per_item' | t }}: {% if item.line_level_discount_allocations.size > 0 %} {% render 'price-element', price: item.final_price %} {% endif %} {% render 'price-element', price: item.original_price %}

{{ 'cart.general.quantity' | t }}: 0 and item.variant.inventory_policy == "deny" %}max="{{ item.variant.inventory_quantity }}"{% endif %} />

{% if item.line_level_discount_allocations.size > 0 %}
{% for discount_allocation in item.line_level_discount_allocations %}

{{ 'cart.general.discount' | t }}: {{ discount_allocation.discount_application.title }} (- {% render 'price-element', price: discount_allocation.amount %} )

{% endfor %} {% endif %}

{{ 'cart.general.total' | t }}: {% if item.line_level_discount_allocations.size > 0 %} {% render 'price-element', price: item.final_line_price %} {% endif %} {% render 'price-element', price: item.original_line_price %}

{{ 'cart.general.remove' | t }}



{% endfor %}

{% if cart.cart_level_discount_applications != blank %}

{{ 'cart.general.discount' | t }}

{% for discount_application in cart.cart_level_discount_applications %}

{{ discount_application.title }} (- {% render 'price-element', price: discount_application.total_allocated_amount %} )

{% endfor %} {% endif %}

{{ 'cart.general.subtotal' | t }}

{% render 'price-element', price: cart.total_price %}

{{ ‘cart.general.excluding_tax_shipping’ | t }}

{% if section.settings.display_special_instructions %}
{{ ‘cart.general.note’ | t: shop_name: shop.name }}:

{{ cart.note }}

{% endif %}

{% if settings.display_tos_checkbox %}

{{ settings.tos_richtext }}
{% endif %}

{% if content_for_additional_checkout_buttons %}

{{ content_for_additional_checkout_buttons }}
{% endif %}

{% if cart.item_count > 0 and section.settings.display_continue_shopping %}

{{ 'cart.general.continue_shopping_link_html' | t }}

{% endif %}
{% endif %}

{% schema %}

{
“name”: “Cart page”,
“class”: “cart-section”,
“settings”: [
{
“type”: “checkbox”,
“id”: “display_continue_shopping”,
“label”: “Show "continue shopping" link”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “display_special_instructions”,
“label”: “Show "note" text box”
}
]
}

{% endschema %}

I have tried copy and paste on the current theme this code, although gives errors

Can someone advice?

Thanks!