Hello, I would like to remove the “sale” badges while keeping only the “sold out” badges. I tried the code below but it removes all types of badges and not just “sale” badges. Do you have a solution please?
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/component-price.css->paste below code at the bottom of the file:
To display the percentage saved with a promotion on a Shopify store, you will need to write some code that calculates the discount and displays it on your product page. Here’s an example of how you could do it using Liquid, the template language used in Shopify:
Go to your Shopify store’s admin panel, and click on the “Online Store” section.
Click on “Themes,” and then click on the “Actions” button for the theme you want to edit.
Click on “Edit code.”
In the “Sections” directory, find the “product-template.liquid” file, and click on it to open it.
Find the section where the product price is displayed, and add the following code after it: