How can I add a total saving to my cart in Prestige Theme?

Good evening,

I tried to ad a total saving to my cart, but it did not work.

I tried {{ total_saving}}, {{cart.compare_at_price}}, {{cart.compare_at_price}}, {{product.compare_at_price}} still did not work.

I use the Prestige Theme, maybe someone knows anything about this.

I am really thankful for anyhelp!

Sincerely Eddy.

@Shockpain2

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

Hey, thank you so much for your help, but unfortunately we are creating this on a template which is offline and has on the account an active template.

Sincerely Eddy.

@Shockpain2

sorry without checking code how can i guide you?

Hey,

I have made the store online.

The link is: https://baminol.myshopify.com/products/test-produkt?variant=39820543426748

Thanks for your help! :slightly_smiling_face:

@Shockpain2

thanks can you please share side cart code

Yes of course!

{%- capture section_settings -%}
{
“type”: {{ settings.cart_type | json }},
“itemCount”: {{ cart.item_count }},
“drawer”: true,
“hasShippingEstimator”: false
}
{%- endcapture -%}

{{ 'cart.general.title' | t }} {%- render 'icon' with 'close' -%}

&nbsp✓ Gute Wahl! Dein Artikel liegt im Warenkorb.

{%- if settings.cart_show_free_shipping_threshold -%} {%- assign threshold_in_cents = settings.cart_free_shipping_threshold | times: 100 -%}
{%- if cart.total_price >= threshold_in_cents -%}

{{- 'cart.general.free_shipping' | t -}}

{%- else -%} {%- capture remaining_amount -%}{{ cart.total_price | minus: threshold_in_cents | abs | money_without_trailing_zeros }}{%- endcapture -%}

{{- 'cart.general.free_shipping_remaining_html' | t: remaining_amount: remaining_amount -}}

{%- endif -%}
{%- endif -%}

{%- if cart.item_count == 0 -%}

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

{%- else -%}

{% render ‘cart-items’ %}

{%- endif -%}

{%- unless cart.item_count == 0 -%}

{%- capture shipping_and_taxes_notice -%}{{ 'cart.general.shipping_and_taxes_notice' | t }}{%- endcapture -%}

{%- if settings.cart_enable_notes or shipping_and_taxes_notices != blank -%}
{%- if settings.cart_enable_notes -%}
{%- if cart.note == blank -%}
{{ ‘cart.general.add_note’ | t }}
{%- else -%}
{{ ‘cart.general.edit_note’ | t }}
{%- endif -%}
{%- endif -%}
{%- if shipping_and_taxes_notice != blank -%}

{{ shipping_and_taxes_notice }}

{%- endif -%}

{%- if cart.cart_level_discount_applications != blank -%}
{%- for discount_application in cart.cart_level_discount_applications -%}

{%- render 'icon' with 'sale' -%} {{ 'cart.general.discount' | t }} ({{ discount_application.title }}): -{{ discount_application.total_allocated_amount | money_without_trailing_zeros }}

{%- endfor -%} {%- endif -%} {%- endif -%}

{{ 'cart.general.total' | t }}: {{ cart.total_price | money_without_trailing_zeros }}
{{ cart.general.total }}Du sparst: {{ cart.compare_at_price_max | money }}

{{ cart.general.total }}Du sparst: €{{cart.compare_at_price_max | minus: cart.price | divided_by:100}}

Kostenloser Versand nach DE :germany:

 {{- 'cart.general.checkout' | t -}}

{%- if settings.cart_enable_notes -%}

{%- if cart.note == blank -%} {{ 'cart.general.add_note' | t }} {%- else -%} {{ 'cart.general.edit_note' | t }} {%- endif -%}
{{ cart.note }}

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

{%- endif -%}
{%- endunless -%}

@Shockpain2

thanks for code but i need some think is missing on code bt not any issue you can do this please add below code

{% 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 }}

Thank you so much!!!

If you have any time left I would be so happy if you could take a look into my other post, about the SVG Icon.

Have a great day my friend :slightly_smiling_face:

@Shockpain2

it’s my pleasure to help us

Hey Ketan, where exactly we paste this code

Hello! did you find a solution ? Im looking for the same answer

@CStudios @NawazGabol
oh sorry for that issue can you please share store url so i will check and let you know

Hello I am facing the same issue, could you please dm me so that I can send you my store url?

@MaxvdH1 yes please share url so i will check and update you

My store URL is: https://www.orlaamsterdam.nl/