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.
1 Like
@Shockpain2
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
1 Like
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.
1 Like
@Shockpain2
sorry without checking code how can i guide you?
1 Like
@Shockpain2
thanks can you please share side cart code
1 Like
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' -%}
 ā 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 -%}
1 Like
@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 }}
1 Like
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
1 Like
@Shockpain2
itās my pleasure to help us
1 Like
Hey Ketan, where exactly we paste this code
3 Likes
Hello! did you find a solution ? Im looking for the same answer
1 Like
@CStudios @NawazGabol
oh sorry for that issue can you please share store url so i will check and let you know
MaxvdH1
February 4, 2025, 9:29pm
14
Hello I am facing the same issue, could you please dm me so that I can send you my store url?
1 Like
@MaxvdH1 yes please share url so i will check and update you
MaxvdH1
February 5, 2025, 7:46am
16