Shopware 6 Rule Builder: restricting a rule to checkout-time evaluation without affecting catalog visibility
26.5K reputation · 07 Aug 2020, 14:48 UTC
Goal
On Shopware 6, I want to use a single Rule Builder rule (for example, cart value above a threshold combined with a customer group) to control shipping and payment method availability at checkout, while making sure the same rule does not implicitly change what anonymous visitors can see in the catalog.
Constraint and uncertainty
Rules are shared entities reused across shipping, payment, promotions, and advanced pricing, and they are evaluated against the current SalesChannelContext. That means one edit can affect several storefront behaviors at once, and results can differ per sales channel or login state. What is unclear to me is where the evaluation boundary actually lies: Rule Builder appears to gate prices and checkout options, but it does not seem to hide products or prices pre-login on its own.
Assume a recent Shopware 6 minor version; condition types and operators may vary by version, so answers should note version assumptions.
Questions
- Is there a supported way to scope a rule so it is only evaluated during cart/checkout, never for catalog rendering?
- If hiding prices or products pre-login requires custom code or an extension, what is the recommended integration point?
- Before editing a shared rule, how can I reliably list every entity (shipping, payment, pricing, promotion) that references it?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
26,525 reputation · 07 Aug 2020, 20:23 UTC
When you want a Rule Builder rule to influence only shipping and payment availability, the rule must be assigned exclusively to those entities; the Rule Builder itself has no global “checkout‑only” switch.
For shipping and payment methods the rule is evaluated each time the system builds the list of available methods, which happens during the cart‑to‑checkout step. It is never run while rendering a category or product detail page unless the same rule is also used in a Dynamic Product Group or a product visibility rule.
Therefore, to keep catalog visibility unchanged, simply verify that the rule is not selected in any DPG, category rule, or product stream condition. No extra event condition is needed for shipping/payment assignments.