Controlling Product Visibility Using Customer Groups
This article explains how to control which customers can see which products by using customer group permissions. The system uses user-defined fields on both products and customers, and visibility is determined by whether the values in those fields match.
How It Works
Product visibility is managed by comparing values in two user fields:
-
Product User Field – this field defines which customer groups (or segments) are allowed to view the product.
-
Customer User Field – this field defines which groups a customer belongs to.
If a value in the product field matches any value in the customer field, that customer will be able to see the product.
Field Details
1. Product User Field
This is where you specify which customer groups can access a product.
You can enter multiple groups, separated by commas.
Example: retail,wholesale,vip
The product will be visible to any customer who belongs to at least one of the listed groups.
2. Customer User Field
This field defines the customer’s group.
Like the product field, multiple group values can be included, separated by commas.
Example: wholesale,vip
If the customer shares any value with the product field, the product becomes visible to them.
3. Matching Logic
At least one value in the product’s field must match a value in the customer’s field for the product to be visible.
If there's no match, the product remains hidden from that customer.
Default Values and What They Do
Customer Default Group
You can apply a default group value (e.g. default
) to all customers.
This is useful when you want some products to only be visible after login, without restricting access to specific customers.
Important: If a product has no value in its product user field, it will be visible to all customers, including logged-out users.
Key Differences Between Customer Default and Product Default
Customer Default:
Applies a default group to all customers.
Used when you want products to be hidden from the public and only shown after login, without assigning customers to specific groups.
Products without any value in the product user field will still be visible to everyone.
Product Default:
Applies a default group to all products (usually via Twig).
Used when you want to hide all products by default, only showing them to customers who have matching group access.
Products with any value in the product field will not be publicly visible unless the customer field matches.
Best Practices
-
Leave the product user field blank if you want a product to be visible to everyone, including logged-out visitors.
-
Use default values carefully. Applying them will restrict product visibility unless the customer matches.
-
When testing, make sure your test customer account includes the expected group values in their user field.
If you have any questions or need help configuring this, feel free to contact support.