How to lock a collection to be viewable by trade customers only

This is very simple with Trade Orders as all trade customers can be identified through their tag, in this example we are using the trade tag "Wholesale".

Here are the steps:

  1. Go to the theme editor for your live theme and under templates click add a new template.

  2. Choose create a new template for "collection" called "wholesale"

  3. On the very first line of your new collection.wholesale.liquid template add {% if customer.tags contains 'Wholesale' %}

  4. On the very last line of the collection.wholesale.liquid template add {% endif %}
  5. Click the save button in the top right
  6. Go to the wholesale collection in the Shopify collection admin and select collection.wholesale as the template for any collections you would like to make into a wholesale collection

Additional Points

  • To leave a message to non trade order customers who attempt to access the page, instead of simply adding {% endif %} to the bottom of the collection.wholesale.liquid template you could add something along the lines of...

  • To exclude wholesale products from the standard search results you can add a "Wholesale" tag to each of your products, then within the search.liquid template where your products are output you can add some liquid like...

Thank you,
The Inspira Support Team.