first availble variant rather than smallest price

Highlighted
Shopify Partner
18 0 2

Hi,  I've read through several threads people have started relating to this but none of their solutions seems to fit with my site.

I would like the collection page to display the first availble variant price rather than the cheapest.  The quick-shop and product page display the prices in variant order but the collection page always displays the cheapest.

Sorry if this turns out to just be a repeat of others enquiries but I can't for the life of me get it to work.

Thanks heaps in advance.

Tamarind

https://www.pajewellery.com

https://www.pajewellery.com/collections/neckwear/diamond - birds nest pendant

https://www.pajewellery.com/products/birds-nest-style-diamond-pendant-in-18ct-white-gold-0-30ct

0 Likes
Highlighted
Shopify Staff
Shopify Staff
283 0 48

Hi Tamarind,

Hugh here from the Guru Team. You will need to adjust the code on the theme to do this. Here is a guide:

  • Visit your Online Store > Themes in Admin
  • Click the [...] button for your theme, and choose Edit HTML/CSS
  • Search for the product-item.liquid file, under Snippet
  • You will want to find this: 
  • {{ itemType.price_min | money }}

    and replace it with this:

  • {{ itemType.variants[0].price | money }}

     

That should show the first variant's price on the collection pages. I hope this helps! Please let me know if you had any other questions about this,
Hugh

Happy selling! :)
0 Likes
Highlighted
Shopify Partner
18 0 2

Thank you Hugh, I'll try that and let you know how I get on. 

0 Likes
Highlighted
Shopify Partner
18 0 2

Thank you so much Hugh, thats worked a treat!

0 Likes
Highlighted
Tourist
6 0 1

I've been trying to fix the same problem, however {{ itemType.price_min | money }} doesn't exist anywhere in my code. I just want the quick view to show the default product price and not the cheapest variant price. Please help!

-O

https://cascadefire.com/collections/hand-tools

 

I feel like it might be something in here:

</div>
{% if settings.collection_product_price != blank %}
<div class="price">
{% if on_sale %}
<div class="compare-price">
<span class="money">{{- product.compare_at_price | money -}}</span>
</div>
{% endif %}
{% if on_sale %}
{% if product.price_varies %}
{% assign sale_price = product.price | money %}
<span class="money">
{{- 'products.product.on_sale_from_html' | t: price: sale_price -}}
</span>
{% else %}
<div class="special-price">
<span class="money">{{- product.price | money -}}</span>
</div>
{% endif %}
{% else %}
{% if product.price_varies %}
{% assign price = product.price | money %}
<span class="money">{{- 'products.general.from_text_html' | t: price: price -}}</span>
{% else %}
<span class="money">
{{- product.price | money -}}
</span>
{% endif %}
{% endif %}
</div>

0 Likes
Highlighted
Tourist
6 0 1

Nevermind my request, I've solved the problem on my own.

 

 

0 Likes
Highlighted
New Member
1 0 0

IS THERE A UPDATED VERSION OF THIS FIX??

0 Likes
Highlighted
Tourist
6 0 1
I just read through the code very carefully, looking for anywhere the word "price" showed up and changed the wording in the areas that I thought would affect the displayed price to "price_max" or "compare_at_price_max" (adding the _max). In my case there were two instances in the collections code. And then I had to do the same for the search bar code. There was a lot of trial and error until I got it to read the way I wanted it to.

I hope that helps :\.

-O

0 Likes