In this tutorial, we are going to cover the following topics:

  • What is a cart based rule?
  • How to create a cart based rules (with examples)
  • How to change the Discount Name displayed at the cart page
  • Available conditions in cart based rule

What is a cart based rule?

The rule applies at the cart page based on the cart contents. 

Simple Scenarios (Example rule configuration can be found below)

  • 10% discount if subtotal is greater than $100
  • 10% discount if total number of quantities in the cart is above 5 nos
  • 10% discount for items from Category A
  • 10% discount for emails having with domain name (TLD): apple.com
  • Free shipping for subtotal greater than $200 

 Complex scenarios


Let's take a look at the cart based rules through simple examples:

How to create a cart based rule ?

Please go to WooCommerce -> Woo Discount Rules -> Cart based rules tab


Start adding a new rule by clicking "Add New Rule" button

Let's create a rule for our first example: - 10% discount if subtotal is greater than $100

 
Scenario 1: 10% discount if subtotal is greater than $100

General

The General tab is just used to define your rule name.  You can add any name and description here.  
You can set a validity dates as well.
NOTE: Make sure to note your current server date and time and set the validity accordingly.

Conditions

We are just going to check if the cart subtotal is above $100.
So choose the "Subtotal at least" condition and set the value to 100 

Hint: You can add more conditions if you want. Example: if you want this rule to apply to WholeSale user roles, you can add the "User Roles in list" condition.

For this example, let's stick to the Subtotal condition only

Discount Tab:

We are going to offer a 10% discount to the customers if they cross a subtotal of $100. So choose the "Percentage discount" and set the value to 10. (Just enter numeric value only)

That's it.  Save the rule.

The rule will now automatically apply when the customer reaches a subtotal of $100.

Here is how it looks at the store front:

Hint:  By default, the discount column shows as "discount". This can be changed. See the section "How to change the discount name"  

Scenario 2: 15% discount if total number of quantities in the cart is above 5 nos

The scenario just requires you to change the conditions
Condition

Scenario 3: 10% discount for items from Category A

In the conditions tab, choose the "Categories in cart" and select the Category that gets the discount.



Scenario 4: 10% discount for emails having with domain name (TLD):
apple.com

This is useful when you want to provide a discount to employees with a company email address.


Scenario 5: Free shipping for subtotal greater than $100 

In the conditions tab, make sure you set the Subtotal at least to $100

In the discount tab, choose "Free shipping"

IMPORTANT: Please go to WooCommerce -> Woo Discount Rules -> Settings -> Cart rules.

Enable the Free Shipping option there

Read more on Free shipping discount


Scenario 6:  10% discount for User Role - Contributor

In the conditions tab, choose the "User Role in list" and set its value. You can also select multiple values there.

Read more on user role based discounts

 

How to change the "Discount" label shown in the Cart totals section?

Please go to WooCommerce -> Woo Discount Rules -> Settings -> Cart Rules tab

You will find a setting: "Coupon name to be used in the cart/checkout in the storefront"

You can either have a custom name/label entered in the field.  Optionally, you can also show the rule name using the following shortcode: {rule_name}

This will show the applied rules in the columns.

Here is an example of how it looks in the storefront:

Available conditions in the Cart based rules

Subtotal at least - A discount condition that applies the discount when the order subtotal is greater than or equal to the value given here.

Subtotal less than - A discount condition that applies the discount when the order subtotal is less than or equal to the value given here. (Examples)

Number of line items in cart (Not quantity) at least - A discount rule that helps to apply the discount based on the number of items available in the cart. If you have the rule using this condition, then the discount coupon applies only if cart contains items greater than or equal to the value given here.

Number of line items in cart (Not quantity) less than - It checks for the number of item in the cart is less than or equal to the value given here.

Total number of quantities in the cart at least - It checks for the total quantities available in the cart. That is, if cart contains 2 quantities from product A and 1 quantity from product B then the total sum of quantity is 3. So if you have entered 5 here, then the discount will applied only if cart contains quantity of 5 or more.

Total number of quantities in the cart less than - It is similar to the above condition but the only difference is it will apply the discount only if cart contains quantity less than or equal to the value entered here. (Examples)

Categories in cart - Using this condition, you could create a cart based discount rule for specific category. (Examples)

User in list - It is used to create a discount rule for specific customers or users.

User role in list - Applying discount to the specific user role will be possible by  using this condition. You can be able to have discount for User Roles in both price rule and cart rules (Some Examples)

Shipping country in list - Discount for the customers coming from specific country will be possible with this condition.

Email ends with - It helps to offer the discount for the users whose email is ended with .com, .org, .in, etc.

Billing city - Discount for specific location will be possible with this condition.

Coupon code - You can be able to activate discount rules with the help of coupon created from woo commerce (How to activate discount rules using coupon)

Free Shipping -With Cart based rules you can also enable Free Shipping as a discount to the User.
(Free Shipping Examples here)

Free Product: using cart based conditions, customers can enjoy a Free gift which will be automatically added to the cart (Free Product Examples)


Video Tutorial  - A Simple Cart based Rule

Quick Links:

Enable Free Shipping Cart based Rule examples

Offer Free Product automatically added to cart

Quantity Based Cart discount Rules

Still unclear ?

Please submit a support request

We are always happy to assist you :)

Did this answer your question?