Why isn't my discount showing on the actual website?

Topic summary

A merchant is experiencing an issue where a discount badge appears in Shopify’s customization preview but doesn’t display on the live website.

Troubleshooting steps suggested:

  1. Verify pricing structure: Ensure the compare_at_price (original price) is greater than the current price in product settings

  2. Check theme code: Locate the <div class="card__badge"> tag in the snippets/card-product.liquid file and verify specific code exists to display the sale badge

Required code snippet:
The solution involves adding conditional markup that checks if compare_at_price > price and the product is available, then displays an “on sale” badge.

The issue appears to be a theme configuration problem rather than a discount setup issue, requiring either price adjustment or theme file modification to properly display sale indicators on the storefront.

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

Hello! I send you 2 screenshots to see how I can see the discount appearing on the customizing tab in Shopify but I can’t really see it appearing in the actual website.

Hi @Martin212

This is BSS Commerce - Full-service eCommerce Agency. We’d love to suggest you this solution:

Step 1: you need to make sure compare_at_price > price, if it still doesn’t work then go to step 2

Step 2: Find

tag in snippets/card-product.liquid file and check if this code already exists, if not then insert it in this tag

{%- if card_product.compare_at_price > card_product.price and card_product.available -%}

                {{- 'products.product.on_sale' | t -}}

{%- endif -%}

Hope this helps you.


BSS Commerce - Shopify Apps & Development Services Provider - Shopify Expert

Level up your Shopify store with our B2B & B2C apps