Hiding Upsell Products on Your Online Store


Since up-sell products act as a regular product, just like any other product on your store, it will be treated as such without adding conditions into your templates. If you would like to hide these products on your store, you could set the product type of these product to be 'HIDDEN'.

Then, to hide these proeducts, in your collection product loop, you can check for items with a product type of 'HIIDDEN', then skip to the next product without displaying the hidden one with this snippet:


{% if product.type == 'HIDDEN' %}

{% continue %}

{% endif %} 

Similar logic would have to be applied throughout your theme wherever you need to ensure the product is not displayed.

if you want to hide this collection from your collection page, the same logic applies to your collections.liquid file:

{% if collection.handle == 'upsell-collection' %}

{% continue %}

{% endif %} 
0 out of 0 found this helpful



Please sign in to leave a comment.