How to display only in-stock items' lowest price on landing page?

On my main landing page I have two sections showing 6 product from a collection. The problem is that the price shown is always the lowest price regardless of whether the item is in stock or not. https://greenphones.no/ Look at the sale item Apple iPhone 7 which shows 1490 as the lowest price, but its not in stock.

https://greenphones.no/collections/apple on this page its the same thing.

What I see is that Shopify is controlling the price display on the landing page, but Boost Commerce (Filter app) is controlling the price display on the collection page.

On thought of course is to add the text ‘From’ before the price, but ideally I only want to show the lowest price of what’s actually in stock.

Hi @Greenphones ,

You can go to your price show file and add this code it will show up with “from” this will be much simpler to show the lowest price of what’s actually in stock.

That file will be in the snippets, you can search for price or something like that. Ex: https://i.imgur.com/LJE1UBD.png

Code:

{% if product.price_varies %}from{% endif %}

Hope it helps!

Great suggestion. The challenge is finding the price show file in this relatively old theme. I have reached out to the developer and they don’t offer support for an outdated theme.

Hi, you would like to hide the sold-out product?

No, I am hiding the sold out products. The problem is that the collection pages are showing the lowest product price and when clicking on the product, that price is not available because that particular variant is not available.

Hi @Greenphones ,

Can you send me the code of the sections > collection-template.liquid file. If not found, please send templates > collection.liquid file.

I will check it.

Would be a great solution if I could only find the liquid file to update it.

Hi @Greenphones ,

Yes, I need to check templates > collection.liquid file so I can send you further instructions on what file to search.

Because each theme will have a different structure, so I can’t know exactly which file the price is showing in.

Hope it helps!