Magento 2Magento TutorialsAugust 28, 2019Zeeshan Khalid

How to Create Cart Price Rules in Magento 2?

How to Create Cart Price Rules in Magento 2?

The 2 ways to create and manage promotions in your Magento 2 store are Catalog Price Rules and Cart Price Rules. Unlike Catalog Price Rule which displays promotions on catalog or product pages, Cart Price Rules are applied to provide discounts to your customers for their selected products in the cart. These are the discounts which the customers get during checking out like discount coupon, order total discount etc.

The discounts are based on a set of conditions and applied automatically as soon as the conditions are met or when the customer enters a valid coupon code. Let’s dive into it and see how to configure Cart price rules in Magento 2.

5 Simple Steps to Setup Magento 2 Cart Price Rules

In this step-by-step tutorial, we are going to walk you through the steps to configure cart price rules in Magento 2.

Step 1: Add a New Rule

  • To add a new Cart Price Rule, navigate to Marketing -> Promotions -> Cart Price Rule in your Magento store’s admin dashboard.
  • Click Add New Rule in the upper-right corner. You will see 4 main sections. Rule Information, Conditions, Actions & Labels.
  • Expand the Rule Information tab to see the following options.
Let’s see what these options mean.
  • Rule Name: Give the Rule a meaningful name. It is for your internal reference only.
  • Description: This is an optional field where you can explain the Rule for your own understanding.
  • Active: Set it to ‘Yes’ to enable the Rule.
  • Websites: Select Websites where the Rule is to be available.
  • Customer Groups: Select Customer Groups to which the Rule applies.

How to Create Coupon Code?

If you wish to associate a Coupon code with the price rule, select ‘Specific Coupon’ in the Coupon dropdown and do the following.
  • Coupon Code: Enter a Coupon Code that the customer must enter to get the discount.
  • Uses per Coupon: Limits the number of time the coupon code can be used.
  • Uses per Customer: Limits the number of times the coupon code can be used by the same customer. This setting applies to logged in customers only.
  • From & To: Select the date range for which the Rule will be in effect.
  • Priority: Enter a number to determine the priority of the Rule.

Step 2: Set the Conditions

In this step, you can set the conditions that need to be met for an order to qualify for the discount. You can base your conditions on product attribute combination, products subselection, Conditions combination or Cart Attributes. For this example, we will use the Cart Subtotal attribute.
  • Click the "Plus" button to add a new condition. Select Subtotal from the dropdown.
  • Click the (is) link to see all the comparison operators and select greater than.
  • Click the (…) link to enter a subtotal amount.
  • The following condition requires the Cart subtotal to be greater than 500. To add more conditions, click 'Plus' button.

Step 3: Define the Actions

This section describes how prices are updated when the conditions are met. Expand the ‘Actions’ section to see the following options.
  • Set Apply to one of the following.
    • Percent of Product Price Discount: Applies discount by percentage i.e. a percentage entered in the Discount Amount field is subtracted from the original price. For example, if you want to offer a 5% discount, enter 5 in the Discount Amount field. This discount applies to each qualifying product in the Cart.
    • Fixed Amount Discount: Applies discount as fixed amount i.e. a fixed amount entered in the Discount Amount field is subtracted from the original price of each qualifying item in the Cart. For example, if you want to offer a $10 discount, enter 10 in the Discount Amount field.
    • Fixed Amount Discount for Whole Cart: Applies discount to the whole cart i.e. a fixed amount entered in the Discount Amount field is subtracted from the cart subtotal. For example, if you want the discount to be 20% of the original price, enter 20 in the Discount Amount field.
    • Buy X get Y free: Customers must purchase a specific quantity (X) to receive a quantity (Y) for free.
    • Discount Amount: Enter the discount amount that you want to apply.
    • Maximum Qty Discount is Applied To: Determines the maximum quantity of the same product that can get discount in the same purchase.
    • Discount Qty Step (Buy X): This is for the Buy X get Y free option and determines the quantity that the customer must purchase to qualify for the discount.
    • Apply to Shipping Amount: Leaving it to the default option which is No will apply the discount amount to the subtotal only. Changing it to Yes will apply the discount amount separately to the subtotal and shipping amounts.
    • Discard Subsequent Rules: If you want to prevent other rules from processing after applying this rule, set it Yes.

Step 4: Complete the Labels

This section allows you to enter a discount label to be displayed in the order totals section. Expand the Labels section and do the following.
  • Default Rule Label for All Store Views: Enter the text that you want to use. This will be displayed in parenthesis after the word “Discount”. In this example, Discount (New OFFER).
  • If your store has multiple views, enter text for each in the Store View Specific Labels section.

Step 5: Test the Result

When done, click Save in the top right corner.

Note that the new rule is not immediately available. It will take an hour or so to become active after which Magento will recalculate the prices according to the rule. Make sure to test it after it is available.

Got Questions? If you have any issue in creating Shopping Cart Price Rules in Magento 2, you can contact our support team by submitting a ticket here.