Discount Rules

Discount Rules allow you to apply discounts to selected products in your cart, or to the cart subtotal. Conditions allow you to filter how discounts are applied to certain items in the cart, or to the cart as a whole. Coupon codes are optional, and if not entered for the discount, will be applied if the conditions are evaluated to TRUE. You can also import discount coupon code via CSV - check our Tutorial section for more.

Discount Rules can be managed under Product Catalog > Discount Rules.

Applying Discounts to the Cart Subtotal

This page contains a list of rules. The order of these rules is important, because LemonStand applies them one by one, and the result of one rule can be used by another rule. For example, if you have a rule which discounts a product by 10% and another rule which discounts this product by $20, the second rule will use the price discounted by 10% as input.

LemonStand always applies discounts to separate order items first. The price of the discounted items is then used for any cart subtotal calculations. This allows the tax engine to calculate tax(es) properly. For example, if you had the "discount the cart subtotal by $10" price rule and you have two items in the cart which cost $10 and $100, LemonStand will apply a $10 discount to the subtotal of $100.

For steps on discounting with conditions and subconditions, visit our Tutorial section.

Condition Types

Discount each cart item unit price by a percentage or fixed amount of the original price

This condition enables you to set a percentage (e.g. 15%), or an amount (e.g. $10) and apply a discount toward individual cart items.

Discount the entire shopping cart by a percentage or fixed amount

This condition enables you to discount the entire cart total by a percentage, or a fixed amount.

Discounting with Conditions and Subconditions

Let's say we'd like to run a promotional discount based on the quantity of products within a category, in this case the "Tops" category. We want to apply a discount to individual cart items. Here are the rules we'd like to apply:

  1. If 3 or less products from the category "Tops" are in the cart, discount each cart item from this category by 5%.
  2. If 4 or more products from the category "Tops" are in the cart, discount each cart item from this category by 10%.

Since this is a seasonal promotion, we also want these discounts to be applied between the beginning of April and the end of June, 2016. This will require 2 separate discount rules, so let's see how we create the first.

Step 1 - Create a Discount Rule

From the Product Catalog > Discount Rules page, click the Add (+) button to add a new rule. Here you'll see a form, where you can give the rule a descriptive name, we've called it "Spring Tops Sale - 5% off up to 3."

We're going to apply the rule to all customers, so we don't select any specific customer groups. The 'max uses per coupon' and 'per customer fields' are also left blank, since we don't want to limit the number of uses.

We want to put some time boundaries around the promotion, so we set the start date to April 1 and the end date to July 1, and we'll also choose to apply a 5% discount to each cart item unit price (it will expire at midnight on June 30):

Now we need to go ahead and click the Save button to save this discount rule.


Step 2 - Add a Condition for the rule

When we first create and save a discount rule, we can define its basic properties as well as the action we'd like to take when it is triggered. In order to define the conditions and/or subconditions under which this rule is triggered, we'll have to edit the rule we've saved in order to see the entry fields where we can define them. We can open an existing rule to edit by clicking on it in the list.

Once we've reopened it, we can see that there is a new section of the form called "Conditions" which we can expand by clicking on the down arrow to the far right. This section will at first have no conditions listed.

We can now add a condition by clicking on the Add (+) button. At this point, there is a single choice available for discount condition type, which when selected enables you to create a condition based on the quantity of the cart items or subtotal amount. Click the Continue button.

We'll now see a Condition Types configuration form. We'll choose "cart item total quantity" for the parameter. We'll choose "equal to or less than" for the operator field and enter "3" for the value field so that this rule triggers when the number of items in the cart that match it is 3 or less. Finally, we'll the Type field at its default "cart items should match all subconditions" and click the Save button.

Now we'll drop back into the Discount Rule form, and see that there is a defined condition with the parameters we specified that will trigger this rule. We could also add more conditions that would be combined to trigger this rule. For example, if we added another condition where the cart items total quantity was equal to or greater than 2, then the rule would only trigger when the cart items total is 2 or 3. We'll keep it simple in this example with just one condition, so let's click the Save button to save this.


Step 3 - Add a Subcondition to the Condition

Okay, we're almost there! In the same way that we needed to create and save a discount rule before adding a condition, we needed to create a condition before we could add a subcondition. So, to add subconditions to this rule, we'll need to edit the condition we just created. You can do that by clicking on the condition from the list, which will bring up the Discount Condition page.

Now you'll see a new section at the bottom of this page called Subconditions, which you can expand by clicking the down arrow at the far right. It should look like the screen capture below.

You can add a subcondition by clicking on the Add (+) button. You'll then see a list of Condition types for this Subcondition. Choose "Product Attribute" and click the Continue button.

Now you'll see a configuration form for this subcondition. You can choose "Categories" from the Parameter list box and "is" from the Operator listbox. The Parameter box below will be populated with a list of the categories in your product catalog. In this example we'll choose the "Tops" category to match against and click the Save button. Just as with Conditions, you could add multiple subconditions and apply them to any Condition. So if you wanted to apply your rule against more than one category, you could add more subconditions for each category you wanted to match against items in the cart.

And that's it! We've created a discount rule that will discount each item in the cart by 5% if there are 3 or less items that match the "Tops" category. To add a new rule that would discount each item in the cart by 10% if there are 4 or more items that match the "Tops" category in the cart, you'd just follow the same steps and apply a new condition and subcondition that match.

Discount Coupon Code CSV Import

LemonStand offers the ability to import discount rules coupon codes via a CSV file, which allows you to import multiple coupon codes for a specific discount rule.


Supported and Required Columns

Parameter Type Required
Coupon Code coupon_code Required

To import a Discount Code CSV into LemonStand, navigate to the Product Catalog > Discount Rules page. Click on the Import Discount Rule Coupon Codes button, as seen below:

Clicking on the Import Discount Rule button will take you to the Import Coupon Codes CSV Import page:

From here, you'll upload your CSV and select an existing discount rule to apply the coupon codes to. See Resources for a sample CSV.

Resources

Sample CSV:
coupon-code-csv.csv