> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.upsellplus.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to hide products from the online store and only use them as an upsell product

Products must be **Active** and Published on the **Online Store&#32;**in order for the offers to work:

![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-93856_10lsexn.png =500x341)
We understand that there are times wherein you will want certain products to be used **only** as upsells or free gifts. To do that, we'd need to add some lines of code to the liquid files you'd want the products to be hidden, and here are the steps:

1. We'd need to tag the product you'll be hiding. We'll use the **'exlude-search'** tag
2. Make sure the product is not included in any collection. [Remove products from a manual collection](https://help.shopify.com/en/manual/products/collections/manual-shopify-collection#remove-products-from-a-manual-collection)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-94656_x7jy34.png =300x320)
3. Locate the liquid files of the places you want to hide the product: If you want to completely hide the product, you'd want to hide it from these sections:

* main-search.liquid
* predictive-search.liquid
* main-cart-items.liquid
* cart-drawer.liquid

4. Once you've located the places you want to hide the product from, these are the lines of code you'd need to add:
```
 {%- if item.object_type == 'product' and item.tags contains 'exclude-search' -%}
 {%- continue -%}   {# skip this item #}
 {%- endif -%}
```

* For the **main-search.liquid**, find  "{%- for item in search.results -%}" line of code and paste the code just below it:

![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-10034_gknyfx.png =1000x300)

* For the **predictive-search.liquid,&#32;**find "{%- for product in predictive_search.resources.products -%}" line of code and paste the code just below it:

![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-10054_16rok4s.png =1000x226)

* For the **main-cart-items.liquid,&#32;**find "{%- for item in cart.items -%}" line of code and paste the code just below it:

![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-10074_1t9zumd.png =1000x204)

* For the **cart-drawer.liquid,&#32;**find "{%- for item in cart.items -%}" line of code and paste the code just below it:

![](https://storage.crisp.chat/users/helpdesk/website/-/a/b/f/a/abfa0cd47f75e80/screenshot-2025-07-16-at-10084_1iijr2v.png =1000x225)

|| Note: Your upsold product or free gift will be visible in the checkout page 
