Add text to specific items on cart page e.g. 'sale' for items with discount?

Hi there, I would like to have the word ‘Sale’/‘Discount’ next to the price of discounted items only in the shopping cart page. Please see attached images. Can this be done? Can anyone tell me how to do this, please?

Currently:

What I’m trying to get:

1 Like

Hi @peaches22 ,

Would you mind to share your URL website? with password if its protected. Thanks!

Hi @Made4uo-Ribe ,

URL: https://www.rubysambition.com.au/

Password: potatododo

Thanks!

1 Like

Thank you for the information.

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
  4. And Save.
.product-option:nth-child(2):after {
    content: "Sale!";
    color: red;
    font-style: italic;
}

Result:

It is like this? I hope it help.

@Made4uo-Ribe , it looks great but the problem is, the word ‘Sale!’ appears with every product. Is there a way to make it appear with only specific products e.g. those with discount? I use ‘compare price at’ method for discounting items.

1 Like

Yeah, i just thought that is what you mean. Because the other solution that I think is you need to write a liquid code for this design.

1 Like

Hi @Made4uo-Ribe , it’s okay now, I’m just using an app to do that, cheers :slightly_smiling_face:

1 Like

Out of interest, which app did you end up using?