Change start/from price products with variant (Dawn)

Solved

Change start/from price products with variant (Dawn)

jborst1986
Excursionist
21 1 1

Hello,

 

I have a product with multiple variations in price. From 2 EURO to 29,61 EURO to 79,95 EURO.

 

I would like to show the second price 29,61 EURO, (instead of 2 EURO lowest price, because that is a sample price) as the from price/start price on for example the collection page.

 

How can I adjust?

Thanks!

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
8230 1975 2419

This is an accepted solution.

Hi @jborst1986 

 

To show the second price instead of the lowest price, please follow the instructions below

 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Snippet" folder, open the "card_product.liquid", then find this code below
 {% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
  • Then replace the code if you do not want to show double OR place the code below above it 
{% assign uniquePrice = card_product.variants | map: "price" | uniq | sort %}
<span>From {{ uniquePrice[1] | money }}</span>

 

See image below for reference

Made4uoRibe_4-1699083586992.png

 

  • And Save.
  • Result

Made4uoRibe_3-1699083382686.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 4 (4)

PaulNewton
Shopify Partner
7121 631 1484

Hi @jborst1986 that requires a theme customization that will vary by theme and or apps in use and any previous customizaitons.


For Dawn you need to replace price_mins value in the snippet price.liquid with your logic

https://github.com/Shopify/dawn/blob/main/snippets/price.liquid#L23 

Something like

 

{% if product.handle == 'special-product %} 
 {% assign price_min == product.variants[1].price %}
{% endif %}

 

where .variants[1] is the second variant presuming that has the next minimum price.

 

If you need this customization fleshed out then contact me by mail for services, Contact info in signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Good Hunting.

Contact [email protected] for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Made4uo-Ribe
Shopify Partner
8230 1975 2419

This is an accepted solution.

Hi @jborst1986 

 

To show the second price instead of the lowest price, please follow the instructions below

 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Snippet" folder, open the "card_product.liquid", then find this code below
 {% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
  • Then replace the code if you do not want to show double OR place the code below above it 
{% assign uniquePrice = card_product.variants | map: "price" | uniq | sort %}
<span>From {{ uniquePrice[1] | money }}</span>

 

See image below for reference

Made4uoRibe_4-1699083586992.png

 

  • And Save.
  • Result

Made4uoRibe_3-1699083382686.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
jborst1986
Excursionist
21 1 1

Thanks, it works great now.

jnhgs
Tourist
5 0 2

This didn't truly work for me. Now it says that the highest price of my two variants. But it also "From X price" - X here not being thew lowest. I don't want it to state "from X", I just want it to display the variant with the highest price as this is the primary option for most people.

 

I got this product in two variants. The one with the lowest price is a secondary item and the one with the highest price being the one, that most people will actually be looking for.

 

I do not want to highlight the fact that I have smaller edition of theis product, but cuious people who goes to the product page might discover themselves that it also exists in a smaller size.