
In this video, we’ll show you how to display a discount in percentage on your product page using the Sense theme from Shopify.
Add Code in Price.liquid File
Add the following code to price.liquid file line no. 85
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
-{{ compare_at_price | minus: price | times: 100 | divided_by: compare_at_price }}% OFF
</span>
Add Code in Card-product.liquid File
Add the following code to card-product.liquid file line no. 127
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
-{{ card_product.compare_at_price | minus: card_product.price | times: 100 | divided_by: card_product.compare_at_price }}% OFF
</span>
Add Code in Base.css File
Add the following code to the bottom of base.css file
.card__badge .badge{
border-radius: 0;
font-size: 13px;
background-color: red;
font-weight: bold;
border: none;
}
.price .price__badge-sale {
border-radius: 0;
font-size: 13px;
background-color: red;
font-weight: bold;
border: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
![[FREE] - How To Add Volume Discount in Shopify with Sale Badge](/_astro/_FREE_%20-%20How%20To%20Add%20Volume%20Discount%20in%20Shopify%20with%20Sale%20Badge.DeAH13EL_WMT7r.webp)
![GPT-6 Astra + OpenCode - 3D WordPress Websites [This is INSANE]](/_astro/GPT-6%20Astra%20_%20OpenCode%20-%203D%20WordPress%20Websites%20_This%20is%20INSANE_.CFF0euP5_3Xbbj.webp)



