Change start/from price products with variant (Dawn)

Solved
jborst1986
Tourist
14 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
3997 913 1116

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!

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


View solution in original post

Replies 4 (4)
PaulNewton
Shopify Partner
5931 537 1240

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.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


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

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


Made4uo-Ribe
Shopify Partner
3997 913 1116

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!

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


jborst1986
Tourist
14 1 1

Thanks, it works great now.

jnhgs
Visitor
1 0 0

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.