Demac Media Demac Media Brand Demac Media Brand



Shopping Cart Price Rules in Magento: A Walk-Through

Timer Icon 8 Mins

Magento Commerce, Magento Tutorials

Shopping cart rules are an extremely useful tool within both Magento Community and Enterprise editions. These rules allow you to create and apply a wide variety of discounts promotions and discounts on your site. These rules can be simple and apply to a vast number of transactions, or can be completely customized to allow discounts on particular products, customer groups, quantity restrictions and much more.

Download our UPDATED 25 Examples of Shopping Cart Price Rules in Magento 2 by clicking below:

Download All 25 Examples!

Shopping Cart Price Rules with example

Setting up a successful shopping cart price rule is not difficult to do. You just want to make sure to fill out all of the following pertinent information. In this article we will be using the rudimentary example of Receive 20% off your entire order when spending $99 or more, but you will see that this module is capable of much more. Let’s get started.


This section is where the general information such as name, description, and applicable dates can be found. The following shows the fields that need to be filled out for each shopping cart price rule. The following are all of the sections within the Rule Information tab that needs to be filled out for each new rule:


This is simply the name of the rule, as it will appear in the backend – eg. Receive 20% off your entire order when spending $99 or more


This section should be a concise but ample description of the rule. This is exceptionally resourceful for future creation of similar rules.


This is simply where the rule is set to Active or Inactive. Changes to the status will take effect immediately on the front end once saved from the backend.


This section allows you to choose which customer groups this particular promotion should be applied to.


Here you can choose from 3 options: No Coupon, Auto, Specific Coupon


This is usually set to an unattainable number to allow to unlimited use of the coupon code, but can be customized for limited use.


This value can be set to however many times you want this coupon to apply to specific customers as Magento can track uses per customer within the customer account.


When a rule is set to Active, this date will specify when the rule will commence become applicable on the front end. The rule will automatically turn on at 12:01AM on the From Date.


When a rule is set to Active, this date will specify when the rule will be turned off. The rule will automatically turn off at 11:59PM on the To Date


This section allows you to assign a numerical priority sequence for promotions running at the same time. This section is often used for a spend and save type of promo, when multiple promos apply to a similar set of conditions. The rule with the higher priority number will take precedence over the other(s).



The Conditions section of the rule can be seen as the when in a promotion, as in when the promotion will be applied. The conditions for the rule can be see as the criteria which need to be fulfilled in order for someone to receive the promotion. For this example the promo is get 20% off when you spend $99 or more, so the condition that need to be met is a subtotal of $99 in the cart.

There is only one section in the conditions tab, and that is a logic setup with a variety of options to determine the conditions of your rule. Depending on the rule type the logic of your conditions may vary, but in this example we are simply going to state that the rule will apply if the subtotal is equal or greater than 99.



The actions section of the rule contains two different sections:

1)   Update prices using the following information:

This section is where you apply the specific discount/promotion and outline some specifics for the rule. In the example of receiving 20% off a purchase of $99 or more, the actions are applying the 20% off.

The following are the specific fields that need to be filled out in the actions section for the shopping cart price rule. Please note that we will be using Percentage of Product Price Discount in this example:


This drop down menu contains the options available to you for setting up your discount. The four options are:


This section allows you to specify the numerical amount of the discount. In this case we are going to enter 20 for the 20% discount (no percentage sign needed), but this filed will also work for dollar amounts if that is the type of discount being applied in the Apply section.


This is a section where you can specify a minimum quantity the discount is applied to. In most cases you will not have a maximum, but common examples are limiting the discount to work to one or two sale items per order.


This section specifies the quantity of a product required in a cart in order for a promo to be applied. This field applies only to the BOGO rule available in the Apply section above.


If this setting it set to OFF, the more popular of the two, then the discount will be applied to the subtotal before shipping is calculated [(subtotal – discount) + shipping]. If set to ON then the discount will be applied to the subtotal after the shipping is calculated and added [(subtotal + shipping) – discount].


This setting is used to specify whether or not the rule is for free shipping.


This setting it often set to yes, which will prevent another rule from processing if this one is applied

2)    Apply the rule only to cart items matching the following conditions.

This section is simply another logic box that will further specify the details of the actions. Just as the name of the section implies this is the area where you specify which products/categories/sun-selection of products that the rule will be applied to. We will leave this section blank since our example applies 20% off for the customers’ entire purchase.



This is a very simple section of the rule, and is simply another spot for the title of the rule as can be seen by customers in your checkout. Please note that these labels may or may not show up in your cart depending on the architecture of your site.



Here is where you can append CMS Banners to your specific promotions. These banners will show only if the promotion is active, and can be controlled more directly via the following path CMS – Banners – Related Promotions.


It is always important to test your rules thoroughly before going live with them. A staging/test site is always the best way to create and test shopping cart price rules, but if that option is not available to you it is best to test in low traffic times. The rules will update in real time, so if testing on a live site is necessary it is recommended to have your shopping cart filled items satisfying the promotion, and to simply refresh your cart once the rule has been enabled in the backend.

At the end of the day the shopping cart price rules in Magento are extremely useful tools for executing a wide variety of different promotions on your site. The example in this article was very rudimentary in practice, but it is important to note that you can setup much more complex and detailed rules to suit your needs. Go ahead and create your own shopping cart price rule today!

Subscribe to the Blog

Stay updated with 20,000+ eCommerce leaders in our community

Sign Up

Let’s talk about your 10X return

Icon/Social/Phone Contact us for pricing information