Unlock Exclusive Access: Your Guide to Private Shopify Pages for Agents & Stockists
Hey everyone! I recently saw a fantastic question pop up in the Shopify community that really hits home for a lot of growing businesses: "How can I create a private page specifically for my agents and stockists, displaying exclusive products that the public can't see or buy?"
This is such a common and crucial need for brands expanding into wholesale or B2B relationships, and the discussion around it offered some truly insightful solutions. Let's dive into how you can make this happen on your own Shopify store, drawing from the collective wisdom of the community.
The Core Challenge: Exclusive Access and Products
Our friend veluxe1, who originally posed the question, has a clear goal: a dedicated space for pre-approved agents and stockists to view and purchase specific products, completely hidden from regular customers. The key here is not just hiding a page, but ensuring genuine restricted access, especially if special pricing is involved.
Option 1: The DIY Liquid Code Approach (Good for Hiding, Less for Ironclad Security)
Several community members, like Parampreet and Shopatch, highlighted a popular DIY method using Shopify's Liquid templating language. This is great for hiding content from the casual browser, but it comes with a crucial caveat that Shopatch wisely pointed out: Liquid primarily hides the UI. If someone knows the direct URL to a product, they might still be able to access it or even add it to their cart, even if the page itself is "hidden." However, for many, this level of concealment is perfectly adequate.
Here's how to set it up:
- Tag Your Customers: This is the foundation. Go to your Shopify admin, navigate to Customers, and for each agent or stockist, add a specific tag (e.g.,
agentorstockist). This allows your theme to identify them. - Create Your Private Page or Collection: Design a new page or a product collection that will house your exclusive items. Crucially, do not link to this page or collection in your main navigation menus. You'll provide the direct link to your agents.
- Restrict Access in Your Theme with Liquid: This is where the magic happens. You'll need to edit the Liquid code of the page or collection template you're using.
- Hide Products from Regular Customers: Ensure the products intended for agents are not included in any public collections, are removed from your main navigation, and, if possible, are excluded from your store's search results (you can often do this via Shopify's Search & Discovery app or by adjusting product visibility).
- Test, Test, Test: Log in as an agent to confirm access. Then, log out or log in as a regular customer to ensure the page is correctly blocked.
{% if customer and customer.tags contains 'agent' %}
{% else %}
You do not have permission to view this page.
{% comment %} Or redirect to another page {% endcomment %}
{% endif %}
This code snippet checks if a customer is logged in AND if their account has the 'agent' tag. If both are true, the content within the section will display. Otherwise, they'll see a permission denied message.
Option 2: Leveraging Shopify Apps for Enhanced Control
If coding isn't your strong suit, or you need more robust security and features (like tiered pricing), apps are a fantastic alternative. As topnewyork mentioned, apps like Locksmith are designed specifically for this. Many other "gated store" or "wholesale lock" apps exist in the Shopify App Store.
These apps typically work by allowing you to create rules based on customer tags, location, or other criteria, giving you a user-friendly interface to manage access to specific pages, collections, products, and even pricing. They often provide stronger enforcement at the cart and checkout level than pure Liquid gating.
Option 3: The Gold Standard – Shopify's Native B2B Tools (The Game Changer!)
Now, this is where the conversation got really exciting, thanks to tim_tairli and Shopatch's crucial update! What was once a Shopify Plus-only feature, the foundational B2B tools (company profiles, payment terms, volume pricing, and up to 3 catalogs assigned via Markets) are now available on Basic, Shopify, and Advanced plans! This is huge for merchants like veluxe1.
Shopatch rightly called this the "clean, properly-enforced route." This isn't just about hiding a page; it's about true access control and dedicated pricing, enforced throughout the entire buying journey.
How Shopify's B2B tools work for agents/stockists:
- Enable B2B Features: You'll activate the B2B capabilities within your Shopify admin.
- Create Company Profiles: For each agent or stockist, you'll create a "Company Profile." This allows you to manage their specific details, payment terms, and assign contacts.
- Build a Dedicated Catalog: Create a new product catalog exclusively for your agents. Populate this catalog with the specific products you want them to access, and set their unique pricing. You can keep these products out of your general "online store" catalog.
- Assign Catalogs to Companies: Assign this agent-specific catalog to the relevant Company Profiles. When an agent logs in as a contact under their company, they'll automatically see only the products and pricing from their assigned catalog.
- Real Access Control: This method enforces access and pricing at every stage, including checkout. Regular customers simply won't see these products or prices, and agents will only see what's relevant to them.
This B2B approach is truly the most robust and secure way to handle agent/stockist portals, especially if unique pricing or complex order flows are part of your business model. It offers genuine access control, not just UI hiding.
So, whether you're looking for a quick Liquid fix, an app to streamline things, or the full-fledged B2B capabilities now available on your Shopify plan, you've got solid options. The community discussion really highlighted that the "best" solution depends on how airtight you need the security to be and whether different pricing is a factor. Always remember to test your setup thoroughly from both an agent's and a public customer's perspective to ensure everything is working as intended!