[Old UI] Can I restrict the popup or product cross sells from showing for certain products?

Short answer: Yes, but this also means product (or cart) page cross sells will also not show. This will depend on where additional code below is added; additional code to handle filtering cross sells will affect the template it's on. 

We (or your developer) will need to add some liquid code to your product or cart template to get this done.

You'll first need to know how to identify or classify those products. For example, we'll need to know if those products belong to a specific collection, tag, type or if you only have handles to filter them by. We'll then add some code like the one below to restrict or enable cross sells on those items:

{% unless product.handle == 'black-shirt' %}

{% include 'cross-sell' %}

{% endunless %}

Above will not show cross sells if the url/handle of the product is "black-shirt". More possible control flows can be found here: https://shopify.github.io/liquid/tags/control-flow/

Need this done? Get in touch.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us