Re: Add text before price on product cards/collection pages dawn theme

Solved

Add text before price on product cards/collection pages dawn theme

JordiP
Explorer
53 0 10

Hello, I need to add a text saying 'Desde' before the pricetag on product cards/collection pages, however I want the text to not appear once on the product page.

 

This is cause my prices start from 9.76 and I want to make it evident, but I dont want the text appearing anymore on the product page as it has no use there. Any help is appreciated!

 

Screenshot 2024-12-05 at 11.06.24.png

 (^ This is what it looks like now)

 

Screenshot 2024-12-05 at 11.06.58.png

 (^ This is what I would like it to look like roughly)

 

Store: artisimo.es

Accepted Solution (1)

DaisyVo
Shopify Partner
4340 482 568

This is an accepted solution.

Hi @JordiP 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

.card-information .price__container .price__regular::before {
    content: "Desde ";
}

 

Here is the result: https://prnt.sc/ENAwuXNZTkd9
 
I hope this helps
 
Best,
 
Daisy
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 3 (3)

DaisyVo
Shopify Partner
4340 482 568

This is an accepted solution.

Hi @JordiP 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

.card-information .price__container .price__regular::before {
    content: "Desde ";
}

 

Here is the result: https://prnt.sc/ENAwuXNZTkd9
 
I hope this helps
 
Best,
 
Daisy
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
JordiP
Explorer
53 0 10

Thanks! Would it also be possible to turn the text & price red?

BlackCro
Shopify Partner
103 19 18

You can achieve this by including a variable on the render price element to control when 'Desde' is displayed. Below is an example of how to accomplish this on Dawn theme. 

 

Firstly locate the first occurrence of money_price declaration inside price.liquid and insert the following code. 

 

{% if desde_price %}Desde{% endif %}

 

Screenshot 2024-12-05 at 10.39.53.png

 

Then locate the render 'price' declaration inside card-product.liquid and add the following code to the end of the variable list

 

, desde_price: true

Screenshot 2024-12-05 at 10.39.33.png

 

This will then display 'Desde' only on the collections page and not the product page. Additionally anywhere where render 'price' is used, you can include the desde_price variable to toggle on the text. 

 

Screenshot 2024-12-05 at 10.40.22.png

 

Hope this helps

Simon 

BlackCro.co.uk

CRO & Development Agency



Better Forms - Get a better contact form today!