B2B
If you offer wholesale (or any non-public-catalog purchasing flow), this guide explains how Mercer surfaces Shopify B2B to your buyers.
This guide assumes B2B is enabled on your Shopify plan (Plus or
Commerce Components) and you’ve configured at least one company,
catalog, and price list. Mercer reads native B2B data — customer.b2b?,
customer.current_company, customer.current_location,
variant.quantity_rule, variant.quantity_price_breaks, and the
customer.company_available_locations array for multi-location
switching. No custom metafields are required.
If your store is B2C-only, you can skip this guide. None of the B2B UI renders for non-B2B customers — no extra markup, no extra requests.
What Mercer ships
| Surface | Renders | Where |
|---|---|---|
| Catalog selector | Active catalog name (label “Catalog”); opens a catalog modal for multi-location buyers | Top-of-header B2B bar (B2B users only) |
| Company / location switcher | Chip + dropdown of available company locations for buyers with 2+ locations | Top-of-header B2B bar (B2B users with 2+ locations) |
| Quantity rules | ”Min 6, in increments of 6” summary + stepper clamping | PDP and quick-add (B2B users only) |
| Tier price table | ”10–24: $84, 25–49: $76, 50+: $68” volume table | PDP below price (B2B users only) |
| B2B quick-order | Multi-variant grid with one-click add-selected-to-cart | Reusable section (merchant-addable on any template) |
| Cart aside | ”Payment terms” + term name + “Net N days” + PO/reference field | Cart drawer + cart page |
The B2B-only surfaces render only when customer.b2b? is true. B2C
customers see zero B2B markup and pay zero markup cost.
Header B2B bar
When a B2B customer is signed in, Mercer renders a dedicated B2B bar at the top of the header (above the announcement bar). It holds two surfaces side by side: the company / location switcher and the catalog selector. Neither appears for B2C customers.
Catalog selector
The catalog selector shows the active catalog name under the label
“Catalog”. The name comes from customer.current_location.catalog.name,
falling back to market.name and then the location name when no catalog
object is exposed in Liquid. It is not a “Wholesale” pill and does not
show the company name.
For a single-location buyer it’s a static label. For a buyer with
access to 2+ locations it becomes a button that opens a “Select
catalog” modal (#B2BCatalogModal). The modal lists every accessible
location as a row showing that location’s catalog label, location name,
and payment-terms name; selecting a row navigates to Shopify’s native
company-location switch URL and reloads with that catalog active.
Company / location switcher
If a B2B customer has access to multiple company locations (e.g. a rep
buying for several accounts, or one company with several sites), Mercer
renders a switcher chip with a dropdown that lists each location. The
gate is the number of available locations
(customer.company_available_locations.size > 1), not the number of
companies — a buyer with one company but two locations still gets the
switcher. Each row is a company location, labelled “Company name —
Location name”. Switching navigates to Shopify’s native
company_location.url_to_set_as_current endpoint (a link, not a
login_to_b2b form), with a ?_company_location_id= request-path
fallback when that URL isn’t exposed. The page reloads with the new
location’s pricing and catalog applied.
Buyers with a single location see a compact read-only chip (company name + active location + payment-terms summary) but no switcher dropdown.
Quantity rules
Shopify B2B lets you set per-variant quantity rules:
- Min — minimum order quantity (e.g. “must order 6”)
- Max — maximum order quantity (e.g. “max 240 per order”)
- Increment — order step (e.g. “in multiples of 6 — case packs”)
Mercer surfaces these in two places:
- A rules summary box above the qty stepper on the PDP and inside the quick-add modal: “Min 6, in increments of 6”. Mercer auto-hides this box when the rule is the default (min=1, max=∞, increment=1) — no point printing “any quantity allowed”.
- Stepper clamping: the qty stepper enforces the rules
client-side. Typing “5” on a min-6 product snaps to 6 on blur;
incrementing past max blocks. The stepper data island (
data-min,data-max,data-increment) is the source of truth forpdp.js.
Cart drawer + cart page also enforce the rules on quantity changes.
Setting up quantity rules
- In Shopify admin, go to Customers → Companies → [your company].
- Click into a price list / catalog.
- For the variants where you want rules, set Min, Max, and Increment.
- Save. The rules surface immediately for B2B buyers in that company.
Tier price table (volume pricing)
Shopify B2B lets you set quantity-based price breaks per variant (“10+: $84, 25+: $76, 50+: $68”). Mercer renders these as a tier table below the price on the PDP.
The active row (matching the current stepper quantity) is highlighted. Each row shows:
- The qty band (“10 — 24”, “25 — 49”, “50+”)
- The wholesale price for that band
- The retail SRP (compare_at_price) with strikethrough — when the
variant has a
compare_at_priceset
If the variant has no quantity_price_breaks, the tier table doesn’t
render. So if you have a B2B catalog without volume pricing, this UI
disappears silently.
Setting up tier pricing
- In Shopify admin, go to Customers → Companies → [your company].
- Click into a price list / catalog.
- For the variants where you want tier pricing, click Add quantity price break and configure each tier (minimum quantity + price).
- Save. The tier table surfaces immediately for B2B buyers.
Net 30 / payment terms
If your B2B customer’s location has payment terms configured (e.g. “Net 30”), the tier table header shows the term name and currency (“NET 30 · USD”). The B2B cart aside (cart drawer + cart page) also shows a “Payment terms” block: the term’s translated name, a “Net N days” due line, and a short terms-help note. The cart drawer adds a terms-acknowledgement line below the checkout button:
Submitting confirms this account’s checkout settings apply.
Purchase order / reference field
The B2B cart aside also renders a Reference / PO number field
(attributes[Purchase Order]), persisted as a cart attribute that
carries through to the order. It’s optional by default, but becomes a
required field (validated client-side) when the buyer’s location has
purchase_orders_required? set to true. It renders in both the cart
drawer and the cart page.
Payment terms are configured per company location in Shopify admin under Customers → Companies → [company] → [location] → Payment terms.
Multi-location customers
A B2B customer can have access to multiple company locations (most common: agency buyers, wholesale reps, or one company with several sites). Mercer’s header dropdown lets them switch the active location. The active location drives:
- Which catalog they see (which products / variants are available).
- Which price list applies (B2B vs retail; volume pricing).
- Which payment terms apply at checkout.
The customer’s most recently active location persists across sessions
via Shopify’s standard B2B session cookie. Mercer doesn’t override
this; it reads customer.current_company and
customer.current_location from the Liquid customer drop, and lists
switch targets from customer.company_available_locations.
Quick-add for B2B
The collection-page quick-add modal works for B2B catalogs too. The picker modal renders only the variant option chips and a single Add button — there is no quantity stepper inside the modal, and no tier table. (The volume tier table lives on the PDP, the quick-view modal, and the B2B quick-order grid, not the quick-add picker.)
Two products are gated to PDP-only (no quick-add) regardless of B2B:
- Gift cards — recipient flow needs a full PDP
- Selling-plan-required products — subscription terms need a full PDP
For B2B specifically, products with min > 1 quantity rules still allow
quick-add. The minimum is applied non-interactively: when the buyer
clicks Add, the picker adds Math.max(1, variant.quantity_rule.min)
units. There’s no editable quantity to mis-set.
B2B quick-order section
The b2b-quick-order section is a merchant-addable order grid for
signed-in B2B customers. Buyers enter quantities for multiple variants,
then add the selected rows to cart in one action.
The section self-gates on customer.b2b?. For non-B2B visitors, the
b2c_visibility setting controls whether the section renders nothing
or a plain product list. The quantity grid itself is never exposed to
B2C customers.
Quick order reuses Mercer’s existing quantity-rule and tier-table
snippets, so minimums, maximums, increments, and quantity price breaks
appear inline where Shopify exposes them. Submission uses Shopify’s
native Ajax Cart API through Mercer.cart.add([...]). It does not
create quotes, draft orders, or PO workflows.
| Setting | Type | Notes |
|---|---|---|
source | select | collection or product_list |
collection | collection | Used when source is collection |
product_list | product_list | Used when source is product_list |
show_sku | checkbox | Shows variant SKUs |
show_inventory | checkbox | Shows inventory status for tracked variants |
show_quantity_rules | checkbox | Shows min / max / increment rules |
show_price_breaks | checkbox | Shows quantity price breaks |
color_scheme | select | Default, Editorial dark, Warm neutral, Accent pop, Soft contrast |
b2c_visibility | select | hide or product_list |
B2B and Markets
B2B and Markets compose. A B2B customer in Germany sees:
- The German Markets catalog (if a market is configured for Germany).
- Their B2B company’s catalog filtered to that market.
- Prices in EUR (per Markets) at their B2B tier (per company).
- The German language storefront (per Markets language).
- The header B2B bar — catalog selector + location switcher (per B2B).
- Quantity rules and tier pricing in EUR (per B2B + Markets).
No special configuration is needed for B2B + Markets to compose; both surfaces read from Shopify’s native objects, and Mercer respects both.
Common B2B pitfalls
”Tier pricing doesn’t render”
Three things to check:
- The customer is signed in to a B2B account (
customer.b2b?is true). - The variant has at least one
quantity_price_breakconfigured in the price list. - The variant is in the company’s catalog. If the catalog doesn’t include this variant, the buyer can’t see it at all.
”The qty stepper isn’t enforcing min/max”
pdp.js is the script that reads the data island and clamps the
stepper. If it’s not loaded, clamping fails. Check that you’re not
overriding Mercer’s pdp.js in a Custom Liquid block; if you have
custom JS that prevents Mercer’s from running, the stepper falls back
to free-form input.
”Quick add lets buyers add 1 unit on a min-6 product”
It shouldn’t: the quick-add picker has no editable quantity field, so
there’s nothing to mis-type. When the buyer clicks Add, the picker
adds the rule minimum (Math.max(1, variant.quantity_rule.min))
automatically. Cart-side enforcement (server) catches any client-side
bypass on form submit as a backstop.
”B2B customer sees retail prices”
Usually means the company’s catalog is set to use retail pricing instead of B2B pricing. Check Customers → Companies → [company] → Catalogs.
What’s next
- Read Markets if you also sell internationally.
- Read Theme Editor walkthrough for general composition.
- Read FAQ for more gotchas.