Article Teaser
Aleksandra, QA Tester

By Aleksandra

September 13, 2023

An easy way to tackle Cart Price Rules in Magento 2

Attracting customers and cultivating their loyalty heavily relies on sales, discounts and special offers. However, the true effectiveness of these initiatives is realized when they are managed intelligently and skillfully. Magento coupon codes play a crucial role in facilitating sales on your Magento 2 store by providing customers with discounts.

In Magento you have the flexibility to create coupons for specific customers, customer groups, particular products or the entire catalog, all subject to specific conditions. Furthermore, you can generate multiple coupons or individually, as per your requirements.

How to Create a Cart Price Rule in Magento 2?

Step 1: Create a New Cart Price Rule
  1. In the Magento 2 admin panel go to Marketing > Promotions > Cart Price Rules > Add New Rule
1ooo.png
  1. In the General Information section add Name and Description, assign the rule to the Website and Customer Group and set rule to Active.
2ooo.png

There is a small difference between a shopping cart price rule that includes a coupon and one that does not. The "No coupon" discount will be applied automatically when the conditions are met, while the Specific Coupon discount will be applied when the customer enters a coupon code in the shopping cart.

No coupon
  • Specify the Uses per Customer option - this determines the maximum number of times the rule can be utilized by an individual customer.
3ooo.png
  • Set the Date and Priority which defines its relation to other rules.

Where two cart price rules are created and a customer meets the conditions for both, only the rule with the highest priority will be applied.

  • By enabling the "Public In RSS Feed" option, you can include the promotions in your store's public RSS feed.
SPECIFIC COUPON
  • You can enable the rule along with the coupon by choosing the Specific Coupon option in the Coupon field, then some additional fields will appear.
4ooo.png
  • You can set how many times it can be used Per Coupon and Per Customer. If there are no limitations, leave these fields blank.

(All other options remain unchanged)

Step 2: Set conditions

Within this section you can set conditions (single or multiple) that trigger the activation of cart price rules. To do this, specify the desired cart state for the discount to be applied.

“If ALL of these conditions are TRUE”

Choose one of the available option combinations: ALL/ANY and TRUE/FALSE. If you want to apply the rule to all products, leave it blank.

5ooo.png

Click on Add icon to specify conditions for the rule:

  • Product attribute combination
  • Product subselection
  • Conditions combination
  • Cart Attribute
6ooo.png

If any of the conditions specified in this section are not met, the conditions in the Actions section will also not be applied.

Step 3: Define the Actions

In this section, the cart price rule outlines how prices should be modified, and discounts are applied once all the conditions are met. You can set single or multiple conditions.

7ooo.png
  1. In the Apply field, select one of the available options for the desired action:
  • Percent of product discount
  • Fixed Amount Discount
  • Fixed amount Discount for the whole cart
  • Buy X get Y (the discount amount is Y)
8ooo.png
  1. In the Discount Amount field, enter a number for a discount amount that corresponds to the selected option.

  2. The Maximum Qty Discount is Applied To specifies the maximum quantity to which the cart rule applies, e.g. up to 3 products.

  3. In the Discount Qty Step (Buy X) field, enter the quantity of the product that customer needs to purchase in order to get the discount (only in case you choose the Apply to Buy X get Y Free discount)

  4. By enabling the Apply to Shipping Amount option, you can apply a discount to the shipping amount as well. The way the shipping discount is applied depends on the type of discount chosen. E.g. if you select the "Percent of product price" option, the discount will be applied to both shipping cost and subtotal separately. However, if you choose the "Fixed amount discount," it will be applied only to the subtotal.

  5. Enabling the "Discard subsequent rules" option will stop processing other rules that share the same priority as the current one.

9ooo.png
  1. In this section you can determine which items should be eligible for the shipping discount. If you leave conditions blank, the discount will be applied to all items in the cart.
Step 4: Set the Label
10ooo.png

Within this section, assign a default label for the shopping cart price rule that applies to all store views. It’s especially recommended to specify when there are multiple store views.

Step 5: Manage Coupon Codes (Optional)

If you choose Auto Generation of a specific coupon, there is one more step you need to take - generate it. To perform coupon Auto Generation, you need to complete the following fields:

11ooo.png

Coupon Qty: determines the number of coupons you want to generate.

Code Length: length of the coupon code.

Code Format: can be set as Alphanumeric, Alphabetical or Numeric.

Code Suffix and Prefix: allow you to add additional figures to the coupon code.

Dash Every X Characters: allows you to add dashes to the coupon code.

Click on the Generate button and the coupon is now ready to test.

Step 6: Save and test the rule
  • To finalize the changes, click Save at the top of the page
12ooo.png
  • Verify the rule's functionality by testing it on your storefront to ensure it's works correctly.

Summary

We know how to intelligently manage discounts, create targeted coupons and generate multiple offers in Magento 2. By joining forces, we have the ability to unleash the full potential of your sales and cultivate customer loyalty utilizing the power of Magento coupon codes. By implementing strategic cart price rules we can also significantly enhance your sales performance.

Would you like to innovate your ecommerce project with Hatimeria?

Author
Aleksandra, QA Tester
Aleksandra
QA Tester

A fierce bug hunter and QA specialist. At work and privately, she loves challenges. Endless new ideas don’t let her get bored. As an open mindes person, she enjoys family time, summer trips and live music.

Read more Aleksandra's articles

Interested in something else?

Office

Meet the team

Learn more about company and the team.

Join Us

Join us

Make an impact on your career.