All things Shopify and commerce
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!
Solved! Go to the solution
This is an accepted solution.
Hi @jborst1986
To show the second price instead of the lowest price, please follow the instructions below
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{% assign uniquePrice = card_product.variants | map: "price" | uniq | sort %}
<span>From {{ uniquePrice[1] | money }}</span>
See image below for reference
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
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
This is an accepted solution.
Hi @jborst1986
To show the second price instead of the lowest price, please follow the instructions below
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
{% assign uniquePrice = card_product.variants | map: "price" | uniq | sort %}
<span>From {{ uniquePrice[1] | money }}</span>
See image below for reference
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Thanks, it works great now.
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.
User | RANK |
---|---|
48 | |
46 | |
39 | |
28 | |
20 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023