How can I show % discount in Sale Badge for Out of the Sandbox themes?

Hello,

I’ve searched a lot of examples but I cannot find help how to get % discount to show in Sale badge in Out of the sandbox themes (like Turbo) after 2.0

I’m looking for a solution which shows the % discount in Sale badge (or sticker) in collection page.

Has anyone figured this out?

It’s likely price-ui-badges.liquid code that needs editing, but how.

Thanks, Pauliina

@Pauliina - this wil need code editing where the discount is calculated using actual price and sale price, but again if you have many variants then it will create issue as it can not be very same for all

Ok, for discounted products we do not have variants with differend prices so that would not be a problem at this moment. Do you know the file where the discount is calculated?

@Pauliina - check if you have price.liquid file, most prices are in that only

and if no, then please check product.liquid file and check from where the price is been fetched

There is no price.liquid file