All things Shopify and commerce
I have looked around this forum for results, and the only one I found does not make full sense to me.
The problem: Our products have variants with different prices. When viewing collections, below the product image, the price is displayed. If there is only one variant, the price displayed is that variant's price. If there are multiple variants, the price is displayed as, "From $xxx", where xxx = the lowest price of all variants.
We would like the price displayed to be the lowest price of available/in-stock variants, not the lowest price possible. If the lowest price possible is not in stock, customers feel tricked into a higher price.
Our liquid for the section is as follows (and includes sale price stuff as well):
<div class="price-box">
{% if on_sale %}
<p class="sale">
<span class="old-price"> {{ product.compare_at_price_min | money }}</span>
<span class="special-price">{% if product.price_varies %}{% include 'varies_from' %}{% endif %}{{ product.price_min | money }}</span>
</p>
{% else %}
<p class="regular-product">
<span>{% if product.price_varies %}{% if product.price_varies %}{% include 'varies_from' %}{% endif %}{{ product.price_min | money }}</span>
</p>
{% endif %}
</div>
I can't find anything that relates specifically to lowest available price. I am not fluent enough in the coding to create my own work-around using variant.available and other terms, if that makes sense.
Any help would be appreciated!
I'm surprised noone has resolved this yet. I'm having the same problem across multiple sites.
Shouldn't Shopify default the price shown to be the lowest in stock variation?
I'm having a similar problem. The product collection and home page show the product on sale with the larger size / higher price as the "regular price" and the smaller size / lower price as a sale price
Replace This:
{{ product.price | money }}
With This:
{{ product.selected_or_first_available_variant.price | money }}
Hello.
What if the lowest price is on sale, then it shows 100$ (normal price) - 150$ (sale price)
Where to replace the code?
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024