Re: Hide sold out items from search Dawn Theme

Hide sold out items from search Dawn Theme

LabelSource
Explorer
60 1 10

Hi All, Sold out products show when searched. How do i hide this without a third party app

 

no liquid file just JSON

 

Thanks

Screenshot 2022-05-23 at 16.05.46.png

Replies 2 (2)

LitExtension
Shopify Partner
4860 1002 1151

Hi @LabelSource,

You can refer https://shopify.dev/themes/navigation-search/search

Please follow the steps below:

- Step 1: Go to header.liquid file, find 'options[prefix]' and add code at line 307 and 457:

Screenshot.png

- Step 2: Go to main-search.liquid file, find 'options[prefix]' and add code here:

Screenshot.png

Code:

<input type="hidden" name="options[unavailable_products]" value="hide">

Hope it helps!

 

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
LabelSource
Explorer
60 1 10

Hi thank you, that has worked, but now my search bar is partly hidden once clicked on, see below 

 

Screenshot 2022-05-24 at 19.08.59.png