Skip to main content
Discounts based on Cart Line Item Count

Discover how to offer discounts based on the number of individual products present in the cart using Discount Rules for WooCommerce Plugin.

Ramesh avatar
Written by Ramesh
Updated over 9 months ago

Introduction:

Cart Line Item or Line Item Count refers to the number of individual products that are added to the shopping cart. Each product added to the cart is considered a separate line item.

For example, if a customer adds three different products to the cart, the line item count will be three.

Discount Rules for WooCommerce plugin enables retailers to create discount rules based on cart line item count, which encourage customers to buy more products. These discounts increase the average order value, encourage customers to purchase more, and improve sales and revenue.

Examples scenarios of setting up discounts based on line items in the cart:

  • Get a 20% discount on the entire cart when there are more than 3 different products in the cart. (Count all items in cart)

  • Enjoy a 20% discount on a specific category in your cart when you have more than three different products from that category. (Only items chosen in the filter sets for this rule are counted)

  • Enjoy a store-wide $5 discount when purchasing any 5 different products from the store.

To create discount rules with Line Item Count, install and activate our free pack Discount Rules for WooCommerce. We are happy to let you know that Free Pack is sufficient to create rules with line item count condition, but the PRO pack offers more advanced features.

Now, let's take a closer look at each example in detail.

Example 1 : Get a 20% discount on the entire cart when there are more than 3 different products in the cart. (All items in the cart are counted)

This discount offer provides a 20% discount on the entire cart if there are more than three different products in it.

To create this rule, follow these steps

Creating a Discount Rule:

  • Go to WordPress dashboard -> WooCommerce -> Discount Rules -> Click on “Add New Rule” button

  • Select the discount types as “Cart Adjustment”, since we are offering 20% off from the whole cart

Then configure the discount rule as seen in the below screenshot:

To configure the rule with “Line Item Count” condition, follow these steps:

  • Choose "All Products" (storewide) from the filter options since in this example, we are offering 20% off while the customer buys any 3 different products from the store.

  • Set the discount type to a 20% percentage discount. You also have options to choose Fixed discount or Fixed discount per product.

  • Give a discount label/ coupon name for this discount

  • Include “Line Item Count” as additional condition, enter the value as 3

  • Set How to calculate the line item count -> Count all items in cart

  • Click on “SAVE” once we have successfully created the rule.

Now, customers who are purchasing at least 3 or more different products from the shop, will receive 20% off from the entire cart.

Here is the cart page screenshot showing an example:

Example 2 : Enjoy a 20% discount on a specific category in your cart when you have more than three different products from that category. (Only items chosen in the filter sets for this rule are counted)

This discount offer provides a 20% discount on a specific category in cart if there are more than three different products from that category added to cart. Only items that are chosen in the filter (For example category “Accessories”) will be counted from cart to calculate discount.

To create this rule, follow these steps

Creating a Discount Rule:

  • Go to WordPress dashboard -> Woocommerce -> Discount Rules -> Click on “Add New Rule” button

  • Select the discount types as “Cart Adjustment”, since we are offering 20% off from the whole cart

Then configure the discount rule as seen in the below screenshot:

To configure the rule with “Line Item Count” condition, follow these steps:

  • Choose "Category” as filter from the filter options since in this example, we are offering 20% off while the customer buys any 3 different products from the category “Accessories”. Adding a specific category in the filter section requires PRO. Get Discount Rules PRO

  • In-list the category “Accessories” by typing a few characters of that category.

  • Set the discount type to a 20% percentage discount. You also have options to choose Fixed discount or Fixed discount per product.

  • Give a discount label/ coupon name for this discount

  • Include “Line Item Count” as additional condition, enter the value as 3

  • Set How to calculate the line item count -> Only count items chosen in the filters set for this rule.

  • Click on “SAVE” once we have successfully created the rule.

Now, customers who are purchasing at least 3 or more different products from the “Accessories”, will receive 20% off from that category.

Here is the cart page screenshot showing an example:

Example 3: Enjoy a store-wide $5 discount when purchasing any 5 different products from the store.

This discount offers $5 off on all products in store if there are more than five different products in it.

To create this rule, follow these steps

Creating a Discount Rule:

  • Go to WordPress dashboard -> Woocommerce -> Discount Rules -> Click on “Add New Rule” button

  • Select the discount types as “Cart Adjustment”, since we are offering 20% off from the whole cart

Then configure the discount rule as seen in the below screenshot:

To configure the rule with “Line Item Count” condition, follow these steps:

  • Choose "All Products" (storewide) from the filter options since in this example, we are offering $5 off while the customer buys any 5 different products from the store.

  • Set the discount type to $5 Fixed Discount. You also have options to choose Percentage discount or Fixed discount per product.

  • Include “Line Item Count” as additional condition, enter the value as 5

  • Set How to calculate the line item count -> Count all items in cart

  • Click on “SAVE” once we have successfully created the rule.

Now, customers who are purchasing at least 5 or more different products from the shop, will receive $5 off store wide.

Here is the cart page screenshot showing an example:

Some of the above discussed examples (example 2) require a PRO version.

Next Steps:

You may also want to check out these helpful guides:

Refer this video to know more about Line Item Count conditional scenarios:

Still unclear?

If you need any assistance, please create asupport request at our ticket system. We are always happy to assist you :)

Did this answer your question?