Need help to customizing my salebadge on the productgrid

Dededoe
Tourist
9 0 0

Ive searched all over to find out how to show clearly on the collection productgrid the percentage the costumer will save but somehow I cant find anything about it anywhere and it only shows a yellow dot.. but when I click the product it look totally fine in the product page.. 
So hopefully someone in here have the solution the solve my problem.
Thanks a lot!!

 

 

 

Skærmbillede 2023-11-18 kl. 14.21.51.pngSkærmbillede 2023-11-18 kl. 14.21.40.png

 

 

Reply 1 (1)

Dededoe
Tourist
9 0 0

I fixed it myself never mind 🙂
Skærmbillede 2023-11-18 kl. 15.18.49.png


For others who might run into the same issue heres what I did.

shopify.admin - Themes - press the ... - edit codes - search for card-product.liquid - find the show-badges mine were at line 132 - remove the "<span id="NoMediaStandardBadge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">{{ 'products.product.on_sale' | t }}</span>" - insert 

 {%- assign savings = card_product.compare_at_price | minus: card_product.price | times: 100.0 | divided_by: card_product.compare_at_price | round | append: '%' -%}
<span id="NoMediaStandardBadge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">{{ savings }} OFF</span>

 

I´d remove the OFF to only show the percentage. 🙂