Showing the cheapest price on the collection page/all products page

Tourist
17 0 1

Hi, 

 

I'm using the debut theme and my products all have the option of 30$ or 35$. However, on my "all products" or "collections" page, Shopify list some at 30$ (cheapest) and some at 35$. All products are available and all variants are active. 

 

How can I only show the cheapest variant?

 

Thanks

 

www.milugal.com

0 Likes
Shopify Expert
2486 416 523

Hi @fansse 

Follow this:

1. Open Snippet->product-price.liquid ->find  bellow code:

{%- assign money_price = price | money -%}

Replace it with:

{%- assign money_price = product.price_min  | money -%}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Shopify Partner
1141 92 139

Look for the product-listing.liquid file in Snippets folder.

<div class="prod-price">{% if product.price_varies %} {{ 'products.general.from' | t }} {{ product.price_min | money }} - {{ product.price_max | money }} {% else %}{{ product.price | money }}{% endif %}</div>

 Remove the like coding "- {{ prodict.price_max | money }}"

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
Shopify Expert
2674 65 664

There is no need to try using product.price_min, since product.price  is the same as product.price_min. 
https://help.shopify.com/en/themes/liquid/objects/product#product-price 

 

One problem I've noticed is that your compare_at prices are less than current price -- this is wrong and breaks the theme logic.

.price  is supposed to be a current ("sale") price, while .compare_at  price is the "regular" price.

For example, this variant has .price of $30, but .compare_at_price is $19.74. Try making compare_at_price  to be, say $37 and see what happens.

Otherwise there must be something wrong with your snippet code.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
1 Like