B2B / customer-group layouts
A common B2B requirement: when a customer in the Business group logs in, show them a denser, more functional product page and a B2B-specific homepage with a quick-order block.
- Settings → Rules → Create new rule:
- Name:
B2B customer. - Conditions:
- Customer is logged in = Yes
- Customer group = is one of = Business (or whichever group you use)
- Both inside the same AND container. Save.
- Name:
- Content → Shopping Experiences — build B2B Product Page and B2B Homepage. Save.
- For each B2B layout: Layout assignment → Rules tab → assign
B2B customer. Save. - Settings → Extensions → Advanced Layouts Assigner:
- Product page replacement mode → All (so any product page’s base is eligible).
- Category page replacement mode → All (for the homepage).
- Replacement types — make sure the base’s type is listed under the right row (typically defaults are fine).
How it behaves
Section titled “How it behaves”- Anonymous visitor → both conditions false → no replacement, base layout shown.
- Logged-in B2C customer →
Customer group = Businessis false → no replacement, base layout shown. - Logged-in B2B customer → both true → B2B alternative shown.
Combine with a sales channel
Section titled “Combine with a sales channel”If you only want this on the wholesale sales channel, add Sales Channel = is one of = Wholesale to the same AND container. The plugin AND-s every condition — the layout only becomes a candidate when all match.
Combine with another customer condition
Section titled “Combine with another customer condition”Anything in Shopware’s customer rule conditions works:
- Customer tag —
vipfor hand-picked VIP layouts. - Customer order count —
>= 10for repeat-customer perks. - Customer days since last order —
>= 90to win back lapsed customers. - Customer is new customer — for a welcome layout.
- Customer custom field — for any custom segmentation already in place.
See Custom rule conditions for the full list of supported customer fields.
Gotcha: anonymous visitors and customer conditions
Section titled “Gotcha: anonymous visitors and customer conditions”The customer conditions evaluate against the current logged-in customer. For an anonymous visitor, the underlying value is null. Most equality operators on null return false, so anonymous visitors fall through to the base layout — which is usually what you want.
If you need the rule to match anonymous visitors, use Customer is logged in = No explicitly.
Related
Section titled “Related”- Rules and conditions — the full supported list including customer conditions.
- Multi-sales-channel recipe — combining sales channels with customer scoping.