The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

How to Setup Promotions / Cart Price Rules in Magento 2

Using the Magento 2 platform, you can create a promotion program with a discount code or special price rules to boost sales and retain customers. Today, I will guide you on how to create Cart Price Rule, one of the most common promotion methods for Magento 2 stores.

First of all, let’s learn about the definition of the Cart Price Rule.

What is the Cart Price Rules?

Cart Price Rule is a special rule with conditions you define in the configuration,that allows your customers to buy a certain product at a discounted price. Store Admins will create a coupon code form Magento configuration and your customers will need to insert the code into the Apply Discount box at checkout. The value of the coupon can be checked on the Order Review.

special promotions

Special Promotions for Magento 2

Add various types of promotions to your cart price rules - Boost sales instantly

Check it out!

How to Create a Cart Price Rule Appy Coupon

To create Shopping Cart Price Rule in Magento 2, do the following steps.

-> Tip: Explore Magento 2 Special Promotions to Enhance Cart Rules Grid with details and mass action

5 Steps to Create a Cart Price Rule in Magento 2

Step 1: Create a New Rule

  • On the Admin Panel, Marketing > Promotions > Cart Price Rule.

How to Create a Cart Price Rule Cart Price Rules

  • Click on Add New Rule and complete 4 tabs: Rule Information, Conditions, Actions, and Label.

How to Create a Cart Price Rule Cart Price Rules Information

  • In the General Information section, set Name for the rule and write some descriptions if needed.
  • Enable the rule when Status is Active.
  • Assign the rule to the Website and Customer Group.

    This promotion is not available for guests who belong to NOT LOGGED IN group or customers who do not log in to their accounts when placing an order.

  • Enable the rule along with the coupon by selecting Specific Coupon option on the Coupon field.
    • Insert the Coupon Code that is entered in the checkout process to get the discount. Enable to mark the Use Auto Generation checkbox to publish the multiple coupon codes after saving the rule.
    • Limit the times of using the coupon in the Uses per Coupon and User per Customer. Leave them empty if there is no limitation.
      • Uses per Coupon sets the number of times the coupon code is used.
      • Uses per Customers sets the number of times the coupon code is used by the same customers.

    How to Create a Cart Price Rule Cart Coupon Code Settings

  • If there are many cart price rules at the same time, you should set the active time and priorty to manage them better.
  • Include the rule in RSS Feeds by setting Yes for the Public in RSS Feed.

Step 2: Set the Conditions

  • On the Conditions tab, the statement “If ALL of these conditions are TRUE” appears

    The statement has two bold links “All”and “TRUE” to edit.

    • Click on the ALL link, ALL and ANY options are available.
    • Click on the TRUE link, TRUE and FALSE options are available.
  • Leave the conditions blank if you want to apply for all products

How to Create a Cart Price Rule Cart Condition Statement

How to Create a Cart Price Rule Cart Choose Conditions

  • Continue tapping the Add icon and follow these steps again to add as many conditions of the cart price rule as you need
  • If you want to delete any statement, just hit the Delete icon to remove it.

Step 3: Set the Actions

When all conditions are met, the Cart Price Rule applies to all actions you set here.

How to Create a Cart Price Rule Cart Actions

  • In the left panel of the New Catalog Price Rule page, choose Action tab.
  • In the Apply field, set to options:
    • Percent of product price discount

    The updated price is calculated by eliminating a percentage of original price. The discount applies for each item of the cart in turn.

    The discount is a fixed number and the updated price is calculated by subtracting the discount amount. The discount applies for each item of the cart in turn.

    • Fixed amount discount for whole cart

    To set the discount for the whole cart means the updated price is calculated by subtracting the discount from the cart total.

    When there are X number of items in customer’s cart, they will receive a quantity (Y) for free

  • Enter the Discount Amount with only numbers.

Step 4: Set the Labels

  • Choose the Labels tab.
  • Under the Default Label section, insert the text in the Default Rule Label for All Store Views.
  • Under the Store View Specific Labels, set the label for each store view,

How to Create a Cart Price Rule Cart Labels

If your store supports multiple languages, the label translation can be set for each view.

Step 5: Apply the Rule

  • Save Rule to finish.

How to Create a Cart Price Rule Cart Save Rule

Normally, it will take an hour to make the new rule available. In addition, you should test the rule in the right way to ensure that it works properly.

Suggested promotions you can apply for your Magento 2 store

  • Special price for certain items: to promote new items or less favorited products
  • Free shipping or Promo codes for orders with certain minimum total value: to expand customer shopping cart size
  • Discounts for loyalty customers: to retain customers and motivate them to come back
  • Free items when buying in bulk: to promote wholesaling or to clear stocks quickly
  • Promo code when customers use a particular payment method: to guide customers to use your preferred payment channel

Better Coupon

Better Coupon for Magento 2

Boost sales by taking advantage of discount powers with the Coupon Code extension

Check it out!

How can I custom cart price rule conditions in Magento 2?

To customize conditions for a Magento 2 cart price rule, follow these steps:

  • Develop a custom module, defining a new condition class that extends Magento\Rule\Model\Condition\AbstractCondition.

  • Carry out the validate method in the class to specify custom logic for the condition.

Rule conditions

  • In the admin panel backend, navigate to Marketing > Cart Price Rules to create a new rule.

  • In the Conditions tab, choose All or Any and click the “+” icon to add a condition.

  • Choose Custom from the dropdown, entering the classpath of your custom condition class.

  • Save the rule and test to ensure the custom condition functions correctly.

Creating tailored conditions in Magento 2 enhances flexibility and customization for promotions and discounts.

The bottom line

Promotions or Cart Price Rules could be optimized to serve as a part of sales and marketing strategy for Magento 2 stores. Based on your goals, you can follow this tutorial to generate multiple codes and rules to apply for different customer groups and products flexibly. Extra posts about price configuration can be found below for your interest. In case of any questions, contact us here for a quick reply, or leave comments in the box!

Related topics

Image Description
Hello, I'm the Chief Technology Officer of Mageplaza, and I am thrilled to share my story with you. My deep love and passion for technology have fueled my journey as a professional coder and an ultra-marathon runner. Over the past decade, I have accumulated extensive experience and honed my expertise in PHP development.

Looking for
Customization & Development Services?

8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.

Get free consultant
development service

    Explore Our Products:

    People also searched for


    Stay in the know

    Get special offers on the latest news from Mageplaza.

    Earn $10 in reward now!

    Earn $10 in reward now!

    go up