Shopify Search & Discovery App - Available products only by default

m60digital
Shopify Partner
15 0 5

Hi,


We are using Shopify's Search and Discovery for product filtering. By default, all products are displayed and id the Availability filter has been added, the user can toggle to show only available products. Is there any way to show only items that are available to purchase by default?

 

We don't want to:

Add URL parameters to collection links (so no ?filter.v.availability=1 on links)

Use another app

Require the user to to toggle the availability filter manually

 

If there is currently no way to do this (and I don't think there is, unless I am missing something) could I request this as a feature? Appreciate there are some use cases to show out of stock products but in many cases, it just doesn't make sense to show out of stock products by default. It is really frustrating for a user to filter for a size 11 shoe, for example, only to find it is not in stock.

 

Thanks!

Manchester based Freelance Shopify Developer.
Replies 13 (13)

gr_trading
Shopify Partner
1689 141 176

Hi @m60digital 

 

Request you to try configuring the settings provided at below URL.

 

https://shopify.dev/docs/themes/navigation-search/search#query-parameters

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
m60digital
Shopify Partner
15 0 5

Hi,

 

This relates to search, my post was related to standard collection pages (sorry if that was not clear).

 

Thanks.

Manchester based Freelance Shopify Developer.
gr_trading
Shopify Partner
1689 141 176

Are you willing to include the search functionality on collection page?

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
m60digital
Shopify Partner
15 0 5

User will be able to to search from the collection pages but I'm not sure how this will prevent unavailable products from being displayed on the collection page by default.

Manchester based Freelance Shopify Developer.
gr_trading
Shopify Partner
1689 141 176

Hi @m60digital 

 

You can follow two approaches to hide the unavailable products from the page.

 

1. Make adjustments to your search form to hide the unavailable items.

 

Search settings URL already shared in previous msg.

 

2. Since you don't want to change your URL, which is provided by search and discovery APP.

 

You can custom code in card-product.liquid file.

 

Which will not show the unavailable products on the page.

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
m60digital
Shopify Partner
15 0 5

Making adjustments to the search form as per your suggestion will only affect search results - I want to hide non-available products on the collection page, not just within search results.

 

Custom coding card-product.liquid would allow us to hide unavailable products but this would affect paging and filtering would not work properly so would not be feasible.

Manchester based Freelance Shopify Developer.
gr_trading
Shopify Partner
1689 141 176

Change your collection to automated if it is manual and set the condition as mentioned in the screenshot.

 

gr_trading_0-1701344748516.png

 

Hope this will help...

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
m60digital
Shopify Partner
15 0 5

This would nearly work, but... the filters (powered by Search and Discovery app) would still show options for un-available variants, which I want to avoid.

 

For example, if I have a tee with small, medium and large variants but only have large available, Search and Discovery will still show filter options for small, medium and large by default. Once ?filter.v.availability=1 is set, there is only a filter option for large - we want to default to this state.

 

The solution I am looking for (which I am sure at this point does not exist) is to force the search and discovery app in to 'available only' by default, therefor only displaying available products and applicable filters.

 

If @Shopify are listening, it would be great to have this as an option in the search and discovery app itself.

Manchester based Freelance Shopify Developer.
gr_trading
Shopify Partner
1689 141 176

If it helps request you mark the answer as solution.

 

Your feature can be achieved by custom code in the theme.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

shaggyNRML
Shopify Partner
5 0 0

Hey if you go into the search and discovery app then go to settings you can update these settings and should give you the results you are looking for.

Screenshot 2024-01-17 at 10.12.20 AM.png

m60digital
Shopify Partner
15 0 5

Thanks for the reply. This setting applies to search results only. We need it to apply to collection pages. 

Manchester based Freelance Shopify Developer.

EloiseCamire
Shopify Partner
2 0 1

Also request this as a feature. Availability is the essence of a ecommerce store. If it's not available, we do not sell it. There is no point to show unavailable variants in collection page filter results and users shouldn't have to "filter" the availability. It should be by default.  It's a bad experience for the client and only end up in disappointment when they, for example, search all products by size Large only to end up on product pages where the Large is unavailable. The only way to fix this now is to delete de Large variant on each product page. 

Ashley_Kennerle
Shopify Partner
52 0 6

Another request for Shopify to update Search and Discovery app to only show size options if that size is actually in stock. I've tried workarounds with no success, this needs building in to the app correctly.