Skip to content

CP Overview ​

Creating and Managing Price Rules ​

The Store Price Rule module provides a comprehensive control panel interface for creating and managing sophisticated pricing rules. The interface is organized into logical sections to help you configure rules efficiently.

All rules are shown in one overview, Rules in the sidebar, grouped under a heading per group: Cart Rules, Product Rules and Buy X Get Y Free Rules. Here you can add, edit, delete and reorder the rules. The overview shows the name of the rule with its start and end date, the type of the rule with its code (when the rule is triggered by a code) and whether the rule is active.

Use the filters above the overview to show only one group (type), only the active or inactive rules (status), or to search on the name or code of a rule. When you add a rule while the overview is filtered on a group, the first type of that group is already selected.

Every group is applied on its own, from top to bottom (see Rule Processing). With the up and down arrows you change the order within a group: a rule can't be moved to another group. The arrows are hidden when you filter on status or search, because then not all rules of a group are shown.

When the Store Price Rule module is installed, it replaces the native discount system of the Store module: the Discount page and the discount settings of the Store module are no longer shown in the CP. The existing discounts of the Store module are converted to cart rules (and deleted from the Store module) when you open this CP. See What changes in the Store module.

Basic Rule Settings ​

Rule Name ​

Enter the name of this rule. This is only for your reference and helps you identify the rule in the overview.

Rule Description ​

Enter a description for this rule. This is only for your reference and provides additional context about the rule's purpose.

Active ​

Enable or disable this rule. Inactive rules will not be applied to any orders.

Start Date ​

The start date after which this rule is active. Leave empty for no start date restriction. The rule will only be active from this date forward.

End Date ​

The end date after which this rule is no longer active. Leave empty for no end date restriction. The rule will automatically deactivate after this date.

Trigger Settings ​

Trigger By ​

Choose how this rule should be activated:

  • Automatically when conditions are met: The rule will be applied automatically when all specified conditions are satisfied
  • By code: Customers must enter a specific code at checkout to activate this rule

Code (conditional field - only shown when "By code" is selected) ​

A code customers can enter at checkout to activate this rule. This allows you to create coupon-style discounts that require customer input. A code can only be used by one rule.

The code is entered in the coupon code field of the Store cart (<input type="text" name="coupon_code" value="{cart:coupon_code}"/>, see the Cart tag of the Store module). The code is only accepted when a rule with that code exists, is active and is within its start and end date. When the other conditions of the rule are not met, the code is removed from the cart again (see Coupon codes).

Rule Types ​

The module supports three categories of price rules. The type is chosen when you create a rule and can't be changed afterwards.

Cart Rules ​

These rules apply to the entire cart and include:

  • Cart percentage discount: Apply a percentage discount to the total cart value
  • Cart fixed discount: Apply a fixed amount discount to the total cart value
  • Free shipping: Remove shipping costs when conditions are met

Product Rules ​

These rules apply to specific products and include:

  • Product percentage discount: Apply a percentage discount to qualifying products
  • Product fixed discount: Apply a fixed amount discount to qualifying products

Buy X Get Y Free Rules ​

These rules add one or more free products to the cart:

  • Buy X get Y free: When the conditions are met, the selected free products are added to the cart for free

Discount Value (conditional field - shown for all discount types except free shipping) ​

The discount value for the rule. For percentage discounts, enter the percentage (e.g., "10" for 10% off). For fixed discounts, enter the monetary amount (e.g., "10" for $10 off). The discount is calculated on the prices excluding tax. For product rules the discount is applied to the price per item.

Buy X Get Y Free Entry IDs (conditional field - only shown for Buy X get Y free) ​

Select the products (entries) that are added to the cart for free, at least one is required. Products that are also selected in Entry IDs are left out. The list shows the open entries of the channels that are enabled in the channel settings of the Store module.

The product price, name, SKU and weight are read from the fields set in the channel settings of the Store module, so make sure these are set for the channel. A product without a price (a price of 0 is fine), name or SKU is skipped; the weight counts for the shipping, without a weight field it is 0, and a product that is out of stock is not added (this is written to the log as an error, unless the log setting is set to nothing).

Conditions ​

Cart-Level Conditions (shown for cart rules and free shipping) ​

Minimum Cart Total ​

The minimum cart total (the subtotal of the cart excluding tax, after the product discounts) required for this rule to apply. Leave empty for no limit. This ensures the rule only applies to orders above a certain value.

Minimum Cart Quantity (shown for cart percentage and fixed discounts only) ​

The minimum total quantity of items in the cart required for this rule to apply. Leave empty for no limit.

Product-Level Conditions (shown for product rules only) ​

Minimum Product Quantity ​

The minimum quantity of a product in the cart (the quantity of the cart item) required for this rule to apply. Leave empty for no limit.

Product Conditions (shown for cart, product and Buy X get Y free rules, not for free shipping) ​

Entry IDs ​

Select the products (entries) for this rule. Leave empty for all products.

  • For a Cart Rule, the rule applies when any of these products is in the cart.
  • For a Product Rule, only these products get the discount. This allows you to create product-specific discounts.
  • For a Buy X Get Y Free Rule, these are the products that need to be bought (the "X"): the free products are added when any of these products is in the cart. When left empty, the free products are added as soon as any product is in the cart.

Member and Role Targeting ​

These conditions are shown for all rule types.

Member IDs ​

Select specific members to which this rule applies. Leave empty to apply to all members. This allows you to create personalized discounts for specific customers.

Role IDs ​

Select specific member roles to which this rule applies. Leave empty to apply to all roles. This enables you to create discounts for customer segments like VIP members, wholesale customers, etc.

Usage Limits ​

A rule counts as used when an order is placed with that rule applied, once per order. See Usage limits for the details.

Total Usage Limit ​

The total number of times this rule can be used across all customers. Leave empty for no limit. This is useful for limited-time promotions or flash sales.

Usage Limit Per Member ​

The total number of times this rule can be used per customer: a logged in member, or a guest by the email address of the order. Leave empty for no limit. This prevents customers from abusing discount codes while still allowing multiple uses.

Settings ​

Enable Stacking Discounts ​

This allows you to stack each discount upon each other. Say you have a cart total of 100,- and you have defined 2 discount rules. Both with 10%. The first discount rule subtracts 10,- and the second one subtracts 9,-.

Rule of thumb: the second or later will always use the result of the previous discount.

When disabled, only the first matching rule is applied: the module stops at the first hit. This is checked separately for the cart rules, the product rules (per cart item) and the Buy X Get Y Free rules. A free shipping rule also counts as a hit.

As long as this setting has never been saved, the rules are stacked; save the setting once to make sure it is used.

This is the same setting as the "Enable Stacking Discounts" setting of the Store module, which is hidden in the Store settings when this module is installed.

Logging Settings ​

What should be logged: only errors, everything or nothing.

Logging ​

This is where you can track all logs related to price rule processing and application. You can delete a single log or delete all logs at once.

Available from v2.0.0:

  • Filters: filter the logs by severity (error or notice), by date (a period or a custom range) and by a keyword in the message, and choose how many logs are shown per page. The filters are kept when you sort or go to another page.
  • Bulk delete: select logs with the checkboxes and choose Delete in the bar at the bottom to delete them at once.
  • Export logs: download the logs as a CSV file (separated by ;). The export contains the logs that match the active filters.

Delete all logs deletes the logs of the current site only.