Adding Percentage ammount on Sale Badge in Product Pagem, Dawn Theme

Solved

Adding Percentage ammount on Sale Badge in Product Pagem, Dawn Theme

CarCleanCC
Explorer
57 0 8

Hi!

 

I am using the dawn them and my website URL is carcleansweden.se. I would like to add the same type of sale badge that I already have on my collection page (the text with the amount of the sale):

CarCleanCC_1-1732568595238.png

Onto my product page as well:

CarCleanCC_2-1732568659540.png

 

This is the code I used for the collection page: "<strong>-{{ card_product.compare_at_price | minus: card_product.price | times: 100 | divided_by: card_product.compare_at_price }}%</strong>" but I cant find where to put it in to add the same on the product page.

 

I would hugely appreciate the help!

Accepted Solution (1)

DanCodes
Shopify Partner
55 9 7

This is an accepted solution.

Hi,

Here are the steps:

1. Go to the Online Store.

2. Click Edit code.

3. Find the sinppets folder.

4. Find the file named price.liquid

5. Add the code below: 

 

1.jpeg

 

View solution in original post

Reply 1 (1)

DanCodes
Shopify Partner
55 9 7

This is an accepted solution.

Hi,

Here are the steps:

1. Go to the Online Store.

2. Click Edit code.

3. Find the sinppets folder.

4. Find the file named price.liquid

5. Add the code below: 

 

1.jpeg