Hide wholesale collections from guest users

Goal Hide one or more wholesale collections from guests and show them only to logged-in or approved customers.

When to use this recipe

  • You have a collection like “Wholesale” / “B2B Catalog” / “Distributor Products”.

  • You want regular visitors to see only your retail catalog.


Step 0 – Before you start

Identify:

  • The wholesale collection(s) you want to hide.

  • Whether access is granted to any logged-in customer or only tagged wholesale customers.


Step 1 – Lock content

  1. Go to Apps → B2B Lock → Locks → Add lock.

  2. In Step 1 – Lock content:

    • Name the rule: Hide wholesale collections from guests

    • Choose Hide collections (or equivalent target type).

    • Select the collections you want to hide (e.g., “Wholesale”, “B2B Only”).

(Screenshot idea: collection selector with “Wholesale” checked.)


Step 2 – Control access

Choose who can see those collections:

Option A – Any logged-in customer

  • Condition: If the customer is signed in → All registered customers see wholesale collections; guests do not.

Option B – Only approved wholesale customers

  • Condition: If the customer is tagged with wholesale → Only tagged wholesale customers see them.

Steps:

  1. In Step 2, add your condition (signed in or tag-based).

  2. If using tags, ensure your customers are correctly tagged (e.g., synced from B2B registration app).


Step 3 – Advanced settings

Optional refinements:

  • Exclude any collections that must stay visible (e.g., “Retail”).

  • Customize what happens if a guest hits a wholesale collection URL directly:

    • Show message “This collection is for wholesale customers only. Please log in or request access.”

Click Save.


Check your storefront

  1. As a guest:

    • Wholesale collections should not appear in navigation, collections lists, or search results.

    • Direct access to their URL should show your lock message.

  2. As a logged-in or tagged wholesale customer:

    • The same collections should appear and behave normally.

Last updated

Was this helpful?