Skip to content

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.

  1. 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.
  2. Content → Shopping Experiences — build B2B Product Page and B2B Homepage. Save.
  3. For each B2B layout: Layout assignment → Rules tab → assign B2B customer. Save.
  4. 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).
  • Anonymous visitor → both conditions false → no replacement, base layout shown.
  • Logged-in B2C customer → Customer group = Business is false → no replacement, base layout shown.
  • Logged-in B2B customer → both true → B2B alternative shown.

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.

Anything in Shopware’s customer rule conditions works:

  • Customer tagvip for hand-picked VIP layouts.
  • Customer order count>= 10 for repeat-customer perks.
  • Customer days since last order>= 90 to 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.