I’m seeing inconsistent B2B quantity rule and volume pricing data returned in Liquid for the same product/variant and same logged-in B2B customer context, depending on preview environment (CLI preview Vs Github synced published theme). In some environments, variant.quantity_rule and variant.quantity_price_breaks return expected B2B catalog values. In others, they return default values (min=1, max=nil, increment=1, no breaks), even though the customer is definitely in B2B context.
Reproduction steps
Create a product.
Configure B2B catalog quantity rules + volume pricing for a target variant.
Open storefront in incognito.
Log in as a B2B customer with an active company location assigned to the catalog.
Visit the product page and inspect Liquid output for:
customer.b2b?
customer.current_company
customer.current_location
product.selected_or_first_available_variant.quantity_rule
product.selected_or_first_available_variant.quantity_price_breaks
Compare behavior between:
CLI preview / dev preview (returns expected B2B rule + breaks)
pushed branch preview or another theme preview (returns default/empty rule + breaks)
Additional info
B2B identity appears valid in all cases:
is_b2b=true
customer.b2b?=true
company + location both present
The exact same variant_id is being evaluated.
In failing cases, Shopify returns:
rule_min=1
rule_max=nil
rule_step=1
breaks_count=0
In working cases, Shopify returns expected catalog-configured values for the same variant.
This looks like an environment/session/render inconsistency in how B2B catalog pricing context is applied to Liquid variant objects, rather than a theme logic bug.
I’ve tried this on the standard “Trade” theme to remove any doubt in code logic with the same issues.
This seems weird. I personally work with a few B2B shops and have never seen this discrepancy before. Especially sounds weird if you say that the main theme (Github connected) is the one showing the wrong values.
Can you share some screenshots of the output test data next to each other? Preferably something like:
See the above - the only thing different between the two screenshots is how it was previewed. One is uploaded to the storefront via a github connector and viewed in a preview theme (not working), and the other is previewed in the CLI (working).
That seems very weird, if it’s indeed from the same shop and theres no weird setup where Markets interfere with the catalogs and the two sessions are not the same Market?
Sure, here is the company page. The “B2B” catalog is also applied to the company location. Quantity rules for example are enforced on the server-side but aren’t being passed through to the frontend. Liquid is just falling down for some reason.