Return to site

Can I omit Recommendations for some products?

By default, if you add the Product widget you'll get a set of product recommendations on every product page. We were recently asked how to omit those product recommendations for a handful of 'standalone' items in the store. One example of this might be if you offer a product that goes with almost everything on the store (say, a power cable or batteries) or a service like installation.

The way to do this is to set up a hidden Collection containing the products for which you don't want recommendations to appear.

Then edit your product.liquid template so that the Better Recommendations widget is not included for products that are a member of this collection.

{% assign in_no_recs_collection = false %}

{% for collection in product.collections %}

{% if in_no_recs_collection == false and collection.title == 'NoRecommendations' %}

{% assign in_no_recs_collection = true %}

{% endif %}

{% endfor %}

 

{% if in_no_recs_collection == false %}

{% include 'betterrecs', purpose: 'product' %}

{% endif %}

Note that these products can still appear in the recommendations shown on other product pages. If you want to stop them being recommended you can easily do this with the Excluded Collection setting.

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK