How to show the difference between the price before discount and after

Topic summary

A user wants to display savings information on product pages, showing the discount percentage between the original and sale prices (e.g., “Save 15%”).

Proposed Solution:

  • Calculate discount percentage using Liquid code in the price template file
  • Formula: ((compare_at_price - price) / compare_at_price) × 100
  • Use ChatGPT or hire a Liquid developer to implement the code modifications

Implementation Attempt:
The user tried implementing the solution with ChatGPT assistance but encountered a Liquid syntax error (“Unknown tag ‘{% comment’”) on line 39. The code snippet shared appears corrupted or improperly formatted, making it difficult to diagnose the specific issue.

Alternative Approach:
A third-party app (Fordeer Product Labels & Badges) was suggested, which includes a “Discount Range” feature that automatically displays discount percentages based on compare-at-price and current price.

Status: Unresolved. The user needs help fixing the Liquid syntax error or may consider using the app-based solution instead.

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

Hi @INKLY ,

I have reviewed your store and noticed that the products on the production pages are missing their prices. If that is intentional, then it’s fine. However, if it’s an oversight, I think you should add them.

In addition, if you haven’t found a solution yet and would like to fulfill your request, you can try using our Fordeer Product Labels & Badges.

In our Standard package, you can find this feature in the “Badges” tab >> Design: you can create badges that match your store’s style >> Products: select “Show label on” and choose “Specific products.” Towards the bottom, you will find the Discount Range feature, which allows you to display the percentage/amount discount based on the product’s compare-at-price and price.