Hi David,
Good day!
Just wanted to check if you have an update on the correct coding as per attached so correct percentage will show up?
Thank you so much!
Goal: Replace the “Sale” badge in Shopify’s Minimal theme with a dynamic discount percentage (e.g., 10%).
What was tried: Editing code in Snippets > product-grid-item.liquid by replacing the translation string with a Liquid formula using compare_at_price_max and price to compute % OFF.
Issue encountered: The provided formula renders “0% OFF” for all products. A screenshot was shared to illustrate the problem.
Additional input: Another participant offered to help implement custom code if given the store URL and asked whether the badge should appear across all pages. They also suggested using a page builder app for more flexibility.
Current status: No confirmed fix yet. A follow-up request asked for an updated/corrected code snippet so the correct percentage displays. The discussion remains open.
Key details/terms:
Hi David,
Good day!
Just wanted to check if you have an update on the correct coding as per attached so correct percentage will show up?
Thank you so much!