I want to show 300 OFF label on my product image

Topic summary

A Shopify store owner using the Kalles theme wants to display a fixed discount amount (e.g., “300 OFF”) on product images instead of the current percentage-based discount label (showing “26% OFF” in a red badge).

Current Implementation:

  • The existing code calculates percentage discounts using: product.compare_at_price | minus: product.price | times: 100.0 | divided_by: product.compare_at_price
  • This displays as a percentage label on product images

Proposed Solution:
A respondent suggests modifying the calculation line to show the actual monetary amount saved:

  • Replace the percentage calculation with: product.compare_at_price | minus: product.price | money
  • This will display the saved amount in currency format instead of percentage

The respondent notes some confusion about the exact requirement and asks for clarification to ensure the solution matches the desired outcome.

Summarized with AI on November 24. AI used: claude-sonnet-4-5-20250929.

Hello…
I want to show label of some off instead of percentage…
I am using kalles theme…I have code of percentage discount on my site and its working…but somehow i am not able to change it to amount off on the label…

Code of percentage is as follows

{%- if on_sale and settings.use_sale_label and linklists[hd_up].links.size == 0 -%} {%- if settings.label_sale_style == '1' -%}{{ 'products.product.on_sale' | t }}{%- else-%}{%- assign save = product.compare_at_price | minus: product.price | times: 100.0 | divided_by: product.compare_at_price | ceil -%}{{ 'products.product.save_js' | t: saved_amount:save }}{%- endif -%}{%- endif -%} {%- if new_label -%}{{ 'products.product.new' | t }}{%- endif -%} {%- assign badge_tags = product.tags | where: "badge_" -%} {%- if badge_tags.size > 0 -%} {%- for tag in badge_tags limit:3 -%}{%- assign badgeTag = tag | remove: "badge_" -%}{{ badgeTag | capitalize}}{%- endfor -%} {%- endif -%} {%- if sold_out -%}{{ 'products.product.sold_out' | t }}{%- endif -%}

Right now it showing - 26% in a red color badge…i want to show 300/- OFF

TIA

Hi,

This is a line of code you need to change:

{%- assign save = product.compare_at_price | minus: product.price | times: 100.0 | divided_by: product.compare_at_price | ceil -%}

As you can see, it converts discount to a percentage value.

Not quite sure what you mean by showing 300/- OFF, but here is a solution to show the amount saved:

{%- assign save = product.compare_at_price | minus: product.price | money -%}

It will show the money saved instead of percentage.

Let me know if this is not what you wanted, because your question is a bit confusing.