Change 'Sale' badge text to percentage d ...

Change 'Sale' badge text to percentage discount Shopify's free themes

Jul 09, 2024

Why Show Discount Percentages Instead of Just “Sale”?

Psychological Appeal

Percentage discounts often feel more exciting than flat amounts, even if the savings are the same. For example, “50% off” sounds more impressive than “$10 off a $20 item.”

High-Value Items

For expensive products, a percentage can highlight bigger savings. “10% off” a $1,000 item = $100 off, and that can sound more attractive than a plain dollar figure.

Easy Comparison

Shoppers can instantly compare percentage discounts across different stores and products, making your offers look more competitive.

Sales & Promotions

During events like Black Friday or seasonal sales, “Up to 70% off” creates urgency and excitement, driving more clicks and conversions than a simple “Sale” badge.


How to Show Discount Percentage on Sale Badges (Shopify Free Themes)

By default, free Shopify themes (like Dawn) display a plain “Sale” badge. You can change this to show the actual discount percentage with a small Liquid code edit

  1. For the product page

    • Go to Online Store > Themes.

    • Click on the "..." button next to your current theme and select Edit code.

    image

    • Locate the snippets folder, find and open price.liquid.

    • Find this line of code {{ 'products.product.on_sale' | t }}.

    • Replace it with this code.

      {%- assign percent = compare_at_price | minus:price | times: 100 | divided_by:compare_at_price | round -%}

      Save {{ percent }}%

    • Save your file

  2. For products on the collection page.

    image

    • In snippets folder, find and open card-product.liquid file.

    • Find this line of code {{- 'products.product.on_sale' | t -}} around line 140.

    • Replace the above code with this code.

      {%- assign percent = card_product.compare_at_price | minus:card_product.price | times: 100 | divided_by:card_product.compare_at_price | round -%}

      Save {{ percent }}%

    • Save file

Now your store’s sale badges will display the discount percentage instead of just “Sale.” This small change can make promotions more appealing, boost urgency, and improve conversions.

Vous aimez cette publication ?

Achetez un café à DanBim

Plus de DanBim

ConfidentialitéConditionsSignaler