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.
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
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.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024