Add text before price on certain pages

Solved

Add text before price on certain pages

f2thak
Excursionist
20 0 3

Hi all.  I'd like to add "FROM" before the prices of certain products, on certain pages.

 

This would have been asked before but its different to every theme.  Im just starting this website, would like to know how to change the code myself incase the premium theme Im using is updated by the creator please.

 

Normally I get a "Pro" to do it and it costs a fortune..  Even if I can find someone to do more in future.

 

TIA

Accepted Solution (1)
DaisyVo
Shopify Partner
4385 486 579

This is an accepted solution.

HI @f2thak 

 

Please try this way

 

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head>

 

{% style %}
span.price-item.price-item--regular::before {
    content: "FROM ";
}
{% endstyle %}



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 16 (16)

topnewyork
Astronaut
1332 161 220

Hello, @f2thak 
Please share "Store URL"
Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
f2thak
Excursionist
20 0 3
www.ravencarcovers.com

I want to change only for the two currently shown products please.
Only on home page and collections page if possible.
kodkiosken
Shopify Partner
16 1 5

Please share your password for the store.

 

But in general, Shopify automatically handles “starting from” or “from” prices when a product has multiple variants with different prices. So if a product has variants where one of them is priced lower, Shopify will automatically display the “From [lowest price]” message on the product page or collection page.

 

However, if your product only has one variant or all variants have the same price, this “From price” is not triggered by default. In such cases, it’s possible to customize your theme to always show “From” before the price, regardless of the variant setup.

 

Before exploring a customization, I’d suggest confirming whether the product in question has multiple variants with different prices. If it does, Shopify should already display the “From” price automatically. If it doesn’t and you’d still like the “From” label, we can definitely look into implementing a custom solution.

→ Likes and "Accept as Solution" are highly appreciated!
→ Shopify expert with 8 years of experience.
→ Open for both short- and long-term assignments.
→ Based in Sweden.
→ Get in touch for all things Shopify!
f2thak
Excursionist
20 0 3

Theme is a premium theme called "Swiss"

 

Web password is:  owgoos

 

 

Thanks all!

 

 

kodkiosken
Shopify Partner
16 1 5

I'd be happy to help. Could you let me know which theme you're using?

 

For the solution to work, it’s important to have a systematic way to identify when/where the function should run.

 

For example, you could apply it to "All products in a specific collection", "All products with a specific tag" or "All products without any variants".

 

Similarly, think about how to define which pages this should apply to. Once you have a clear idea, I can guide you through the changes needed in your theme's code!

→ Likes and "Accept as Solution" are highly appreciated!
→ Shopify expert with 8 years of experience.
→ Open for both short- and long-term assignments.
→ Based in Sweden.
→ Get in touch for all things Shopify!

DaisyVo
Shopify Partner
4385 486 579

Hi @f2thak 

 

Please share your store link so I can take a closer look

 

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
DaisyVo
Shopify Partner
4385 486 579

@f2thak 

 

Please share the password of your store too

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

f2thak
Excursionist
20 0 3

website:  www.ravencarcovers.com

 

Theme is a premium theme called "Swiss"

 

Web password is:  owgoos

 

Using App for customisations:  Avis Product Options

 

Thanks all!

f2thak
Excursionist
20 0 3

would love some help with my site thanks guys, even considering hiring someone to make changes

DaisyVo
Shopify Partner
4385 486 579

Hi @f2thak 

 

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.

 

span.price-item.price-item--regular::before {
    content: "FROM ";
}

 

Here is the result: image_720.png

 

This code is a general one. If you're asking to add the "FROM" for each specific product, you'll need to check the code further. However, since the theme doesn't allow for code inspection, we can only go as far as this for now.

 

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
f2thak
Excursionist
20 0 3

Thanks thats perfect, but Im getting this error.  Need to look into it more.

 

"Online Store editor session can't be published"

DaisyVo
Shopify Partner
4385 486 579

This is an accepted solution.

HI @f2thak 

 

Please try this way

 

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head>

 

{% style %}
span.price-item.price-item--regular::before {
    content: "FROM ";
}
{% endstyle %}



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
f2thak
Excursionist
20 0 3

Damn near perfect solution, thank you so much!

f2thak
Excursionist
20 0 3

I have an issue on another site of mine.  The theme is regularly updated, and Ive already paid a lot for the theme to have a few tiny fixes done again.  I was hoping you could help with that one too *please*, as the theme has another update waiting to do.  Once I know how to fix that myself then I'll be more self-sufficient, too.  Thank you very much either way Daisy!

kodkiosken
Shopify Partner
16 1 5

 

I'm not very familiar with the Swiss theme, and I don't have access to the actual code, but it should be very straightforward and wouldn't require a lot of work.

 

I took a quick look at your website and noticed that you only have two products. One simple approach you could try is adding "from" before the price directly in your translation file.

 

Here's how you can do it:

 

  1. In your Shopify admin, go to Online Store and click Themes.
  2. Click the three dots next to the theme you want to edit, then select Edit default theme content.
  3. Search for "{{ price }}" and update it to "from {{ price }}". The label might be named something like "From price HTML", "price" or similar.

Please note that this is a rough workaround since I'm not familiar with your theme and don't have access to its actual code.

 

Lastly, make sure to back up your theme before making any changes.

→ Likes and "Accept as Solution" are highly appreciated!
→ Shopify expert with 8 years of experience.
→ Open for both short- and long-term assignments.
→ Based in Sweden.
→ Get in touch for all things Shopify!
f2thak
Excursionist
20 0 3

thanks but that did not work