Skip to content

Rules Reference

Rules Reference

List of all rule classes across Shopware 6.

Checkout

ClassDescription
Shopware\Core\Checkout\Cart\Rule\AlwaysValidRuleMatches always
Shopware\Core\Checkout\Cart\Rule\CartAmountRuleMatches a specific number to the carts total price.
Shopware\Core\Checkout\Cart\Rule\CartHasDeliveryFreeItemRuleMatches if the cart has a free delivery item.
Shopware\Core\Checkout\Cart\Rule\CartWeightRuleMatches a specific number to the current cart's total weight.
Shopware\Core\Checkout\Cart\Rule\GoodsCountRuleMatches a number to the current cart's line item goods count.
Shopware\Core\Checkout\Cart\Rule\GoodsPriceRuleMatches a specific number to the carts goods price.
Shopware\Core\Checkout\Cart\Rule\LineItemClearanceSaleRuleMatches a specific line item which is on clearance sale
Shopware\Core\Checkout\Cart\Rule\LineItemCreationDateRuleMatches if a line item has a specific creation date.
Shopware\Core\Checkout\Cart\Rule\LineItemCustomFieldRuleMatches if a line item has a specific custom field.
Shopware\Core\Checkout\Cart\Rule\LineItemDimensionHeightRuleMatches a specific line item's height.
Shopware\Core\Checkout\Cart\Rule\LineItemDimensionLengthRuleMatches a specific line item's length.
Shopware\Core\Checkout\Cart\Rule\LineItemDimensionWeightRuleMatches a specific line item's weight.
Shopware\Core\Checkout\Cart\Rule\LineItemDimensionWidthRuleMatches a specific line item's width.
Shopware\Core\Checkout\Cart\Rule\LineItemGroupRuleMatches if a line item has a specific group.
Shopware\Core\Checkout\Cart\Rule\LineItemInCategoryRuleMatches if a line item is in a specific category.
Shopware\Core\Checkout\Cart\Rule\LineItemIsNewRuleMatches if a line item is marked as new.
Shopware\Core\Checkout\Cart\Rule\LineItemListPriceRuleMatches a specific line item has a specific list price.
Shopware\Core\Checkout\Cart\Rule\LineItemOfManufacturerRuleMatches a specific line item has a specific manufacturer.
Shopware\Core\Checkout\Cart\Rule\LineItemOfTypeRuleMatches a specific type name to the line item's type.
Shopware\Core\Checkout\Cart\Rule\LineItemPromotedRuleMatches if a line item is promoted.
Shopware\Core\Checkout\Cart\Rule\LineItemPropertyRuleMatches if a line item has a specific property.
Shopware\Core\Checkout\Cart\Rule\LineItemPurchasePriceRuleMatches if a line item has a specific purchase price.
Shopware\Core\Checkout\Cart\Rule\LineItemReleaseDateRuleMatches a specific line item's release date.
Shopware\Core\Checkout\Cart\Rule\LineItemRuleMatches multiple identifiers to a line item's keys. True if one identifier matches.
Shopware\Core\Checkout\Cart\Rule\LineItemTagRuleMatches multiple tags to a line item's tag. True if one tag matches.
Shopware\Core\Checkout\Cart\Rule\LineItemTaxationRuleMatches if a line item has a specific tax.
Shopware\Core\Checkout\Cart\Rule\LineItemTotalPriceRuleMatches a number to the current cart's line item total price.
Shopware\Core\Checkout\Cart\Rule\LineItemUnitPriceRuleMatches a specific number to a line item's price.
Shopware\Core\Checkout\Cart\Rule\LineItemWithQuantityRuleMatches a specific line item's quantity to the current line item's quantity.
Shopware\Core\Checkout\Cart\Rule\LineItemWrapperRuleInternally handled scope changes.
Shopware\Core\Checkout\Cart\Rule\LineItemsInCartCountRuleMatches a number to the current cart's line item count.
Shopware\Core\Checkout\Cart\Rule\LineItemsInCartCountRuleMatches multiple identifiers to a carts line item's identifier. True if one identifier matches.
Shopware\Core\Checkout\Cart\Rule\PaymentMethodRuleMatches if a specific payment method is used
Shopware\Core\Checkout\Cart\Rule\ShippingMethodRuleMatches if a specific shipping method is used
Shopware\Core\Checkout\Customer\Rule\BillingCountryRuleMatches multiple countries to the customer's active billing address country.
Shopware\Core\Checkout\Customer\Rule\BillingStreetRuleMatches multiple street names to the customer's active billing address street name.
Shopware\Core\Checkout\Customer\Rule\BillingZipCodeRuleMatches multiple zip codes to the customer's active billing address zip code.
Shopware\Core\Checkout\Customer\Rule\CustomerGroupRuleMatches multiple customer groups to the current customers group. True if one customer group matches.
Shopware\Core\Checkout\Customer\Rule\CustomerNumberRuleMatches multiple numbers to the active customers number.
Shopware\Core\Checkout\Customer\Rule\CustomerTagRuleMatches a tag set to customers
Shopware\Core\Checkout\Customer\Rule\DaysSinceLastOrderRuleMatches a specific number of days to the last order creation date.
Shopware\Core\Checkout\Customer\Rule\DifferentAddressesRuleMatches if active billing address is not the default.
Shopware\Core\Checkout\Customer\Rule\IsCompanyRuleMatches if the customer is a company
Shopware\Core\Checkout\Customer\Rule\IsNewCustomerRuleMatches if a customer is new, by matching the firstLogin property with today.
Shopware\Core\Checkout\Customer\Rule\LastNameRuleExactly matches a string to the customer's last name.
Shopware\Core\Checkout\Customer\Rule\OrderCountRuleMatches a specific number to the number of orders of the current customer.
Shopware\Core\Checkout\Customer\Rule\ShippingCountryRuleMatches multiple countries to the customer's active shipping address country. True if one country matches.
Shopware\Core\Checkout\Customer\Rule\ShippingStreetRuleMatches multiple street names to the customer's active shipping address street name. True if one street name matches.
Shopware\Core\Checkout\Customer\Rule\ShippingZipCodeRuleMatches multiple zip codes to the customer's active shipping address zip code. True if one zip code matches.

Framework

ClassDescription
Shopware\Core\Framework\Rule\Container\AndRuleComposition of rules. Matches if all match.
Shopware\Core\Framework\Rule\Container\NotRuleNegates one rule.
Shopware\Core\Framework\Rule\Container\OrRuleComposition of rules. Matches if at least one rule matches.
Shopware\Core\Framework\Rule\Container\XorRuleComposition of rules. Matches if exactly one matches.
Shopware\Core\Framework\Rule\DateRangeRuleMatch a fixed date range to now.
Shopware\Core\Framework\Rule\SalesChannelRuleMatch a specific sales channel to the current context.
Shopware\Core\Framework\Rule\TimeRangeRuleMatches a fixed time range to now.
Shopware\Core\Framework\Rule\WeekdayRuleMatches a fixed day of the week to now.

System

ClassDescription
Shopware\Core\System\Currency\Rule\CurrencyRuleMatch a specific currency to the current context.

B2B

ClassDescriptionComponent
EmployeeOrderRuleMatches if the order was placed by an employeeEmployee Management
EmployeeOfBusinessPartnerRuleMatches if the customer is an employee of a specific business partnerEmployee Management
EmployeeRoleRuleMatches if a specific role is assigned to an employeeEmployee Management
EmployeeStatusRuleMatches if the employee as a specific statusEmployee Management
IsEmployeeRuleMatches if the customer is an employeeEmployee Management