Working with Buy X Get Y discounts
Buy X Get Y discounts in Kentico E-commerce Solution are a cross-selling tool which allows you to increase sales of chosen products. The Buy X Get Y discounts application facilitates a number of shopping scenarios, such as:
- buy some of specified products, get the cheapest product for free, e.g., buy 3 pieces of clothes, get the cheapest one for free, or
- buy some of specified products, get a specific other product for free or with a discount, e.g. buy a computer, get Steve Jobs (E-book) for free, or buy Adidas Zebra Crew T-Shirt, get one more with a 50 % discount.
To set up a basic Buy X Get Y discount:
- Open the Buy X Get Y discounts application.
- Click New Buy X Get Y discount.
- Type a Name for the discount.
- Specify “Buy” conditions. Buy conditions indicate the products that customers need to add to their shopping cart to be eligible to get products for free or with a discount.
- Buy any– select products to select individual products; select products in departments to select specific departments.
- Products or Departments – depending on your choice in Buy any, click Select products or Select departments to select either products or departments.
- Minimum unit quantity – specify how many units customers need to add to their shopping cart to be eligible for the discount.
- Specify “Get” conditions. Get conditions define what products customers get for free or with a discount.
- Get – select cheapest unit for discounted amount to automatically apply the discount to the cheapest product from the set specified in “Buy” conditions; select specific product for discounted amount to define a product that will be added to the customer’s order as a gift.
- Specific product – appears if you selected specific product for discounted amount in Get.
- Discount – select percentage to apply the discount in percent or fixed amount to apply the discount in a specific amount of money in the main currency.
- Amount – specify an exact value of the discount either in percent or in fixed amount according to Discount.
- Click Save.
Now, you have a completed Buy X Get Y discount. Whenever a customer fulfills “Buy” conditions, they will get the discount which you have just specified in “Get” conditions. You can find the newly added discount with the lowest priority (the highest number) at the end of the Buy X Get Y discount list. To create more complex Buy X Get Y discount, see all parameters below.
If you edit or delete a discount, the existing orders stay with that discount. To update existing orders according to the new rules, you must edit the required orders manually.
Buy X Get Y discounts shopping examples
Example 1 – buy one item, get another one free (in other words, buy two items for the price of one): Customer adds two pairs of jeans to their shopping cart. The system automatically applies a 100% discount on one of the items. If a customer adds only one pair of jeans to their shopping cart, another pair is not added automatically.
Example 2 – buy multiple items, get the cheapest one free: Customer adds multiple different books to the shopping cart. The system evaluates which item has the lowest price (before applying other discounts) and applies a 100% discount on that item. See a specific example. The example is also applicable with a discounted product instead of a free one.
Example 3 – buy one item, get a gift: Customer adds a tennis racket to their shopping cart. The system automatically adds a pack of tennis balls (with 100% discount) to the shopping cart. If the customer adds the balls first and then the racket, the system applies a 100% discount on the set of balls which has already been added. See a specific example.
The system adds products to the shopping cart automatically only if you set the “Get” condition of the particular Buy X Get Y discount to “specific product” and select the Add product to cart automatically field.
Customer is not notified that they have an opportunity to purchase a discounted product if so. To notify them you can create a new webpart.
Changing Buy X Get Y discount priority
Buy X Get Y discounts are applied based on their priority. The discount priority is stated with a number. The lower the number is, the higher priority the discount has.
Open the Buy X Get Y discounts application.
Click on the number in the column Priority in the row of a discount.
Change the number to the desired one. The number must be greater than one.
Use greater intervals between priority numbers. If you want to add a new discount inbetween two already existing, you can add the new discount more easily between 10 and 20 than between 1 and 2. If you already have only small gaps, you can also use decimals.
Press Enter or click on the green confirmation button () next to the number.
(Optional) Edit () individual accounts and change the Apply lower priority discountsas necessary. If cleared, no other Buy X Get Y discounts are applied to the shopping cart.
Buy X Get Y discounts are now applied based on the priority that you assigned to them. Note that other discounts of a different type (e.g., volume discounts, product discounts) are still applied.
Example – Buy X Get Y discount priority
You want to set 10 % discount to any book and additional 5 % discount to bought Steve Jobs (E-book).
Create a new discount for any book.
- Name: Buy a book, get 10 % off
- Buy any: products in departments
- Departments: Books
- Amount: 10 %
Set the priority of the created book discount to 20.
Create a new discount for Steve Jobs (E-book).
The system doesn’t sum Buy X Get Y discounts to the same product. If you want to have an additional discount to a product, you have to create a new discount with the total discount amount and assign it a higher priority (a lower number).
- Name: Buy Steve Jobs, get 15 % off
- Products: Steve Jobs (E-book)
- Amount: 15 %
- That is 10 % for any book and the additional 5 % discount for Steve Jobs (E-book).
Set the priority of the created Steve Jobs discount to 10.
Now, when you put a book to the shopping cart, the first discount for books applies. When you put Steve Jobs (E-book) to the shopping cart, the second discount applies.
Displaying Buy X Get Y discounts data on pages, in invoices, and e-mails
You can use the Shopping Cart Totals web part with transformations to display Buy X Get Y discounts on a page, e.g., in the shopping cart. To promote Buy X Get Y discounts on various pages, you can also use your custom web parts.
In invoices and e-mailes, you can use the following macros to display Buy X Get Y discount data. Note that in code Buy X Get Y discounts (along with order discounts) are called OrderRelatedDiscountSummaryItems.
OrderRelatedDiscountSummaryItems – a collection of Buy X Get Y discounts and order discount applied to items in a particular shopping cart instance. The collection’s items hold following values:
- Value – the amount saved after applying the discount, e.g., 50 % of the price of a product.
- Name – the name of the discount as specified in the Buy X Get Y discounts application.
To extract the value-name pairs from the OrderRelatedDiscountSummaryItems collection, use the following macro:
{% OrderRelatedDiscountSummaryItems.ApplyTransformation("Ecommerce.Transformations.Order_OrderRelatedDiscountsContent", "Ecommerce.Transformations.Order_OrderRelatedDiscountsHeader", "Ecommerce.Transformations.Order_OrderRelatedDiscountsFooter") %}
The default installation of Kentico contains ready-to-use transformations with Buy X Get Y discounts in mind. The parameters of the ApplyTransformation method used in the code example are names of the default transformations. The default transformations are stored in the E-commerce transformations page type.
Reference
General |
|
Name |
The discount name that is displayed in the shopping cart, invoices, and e-mails. |
Code name |
The unique identifier of the discount object used by developers in the code. Unless there is a reason to set a particular value, you can leave the default (automatic) option, and the system generates an appropriate code name automatically. |
Enabled |
If selected, the discount is allowed to be applied. If cleared, the discount is disabled. |
“Buy” Conditions |
|
Buy any |
Sets what customer must add to the shopping cart to obtain the discount.
For example, if you set the discount to be applied when customer buys 3 products in Minimum unit quantity and you choose 6 products in this field, customer fulfills the “Buy” conditions whenever they put any combination of products in this field to the shopping cart. |
Products |
Appears when you select products in Buy any. Select specific product, or products. Customer can add any combination of the products to the shopping cart to fulfill the “Buy” conditions. |
Departments |
Appears when you select products in departments in Buy any. Select specific department, or departments. Customer can add any products from the selected department, or departments to fulfill the “Buy” conditions. |
Minimum unit quantity |
Specify how many units customers need to add to their shopping cart to be eligible for the discount. For example, type 2 when:
|
“Get” Conditions |
|
Get |
Select what customers get if they fulfill “Buy” conditions.
|
Specific product |
Appears when you select specific product for discounted amount in Get. Select specific product which gets the discount. |
Discount |
Specify if you want to apply the discount in percentage or in fixed amount.
|
Amount |
Specify an exact value of the discount in percent or in fixed amount according to Discount. The amount has to be a number. When the amount is in percentage, enter a number between 0 and 100. When the amount is fixed, enter a number greater than 0. |
Add product to cart automatically |
Appears when you select specific product for discounted amount in Get, and when Amount is 100 %. If selected, the system adds the specified product to the shopping cart automatically when the shopping cart fulfills the “Buy” conditions If you choose a specific product to be added automatically to the customer’s order as a gift, the system won’t add the product when:
Customer cannot remove an automatically added product if they are entitled to it. If they try to remove the product, the system will add it again immediately. |
Coupons |
|
Customer has to redeem a coupon to get the discount |
If selected, only customers who type valid coupon code are able to apply the discount. You can set coupons on the Coupons tab in the left menu. After enabling the field and saving the discount, you will be redirected there automatically. More info about working with coupons is to be found in separate page. Examples The examples show how the auto-adding feature works if the discount is coupon-based. Example 1:
Example 2:
Example 3:
|
Duration |
|
Valid from |
Specify from when the discount is running. If you leave Valid from empty, the discount will be valid permanently till Valid to. |
Valid to |
Specify to when the discount is running. If you leave Valid to empty, the discount will be valid permanently from Valid from. |
Target customers |
|
Available for |
Choose roles of users who are able to apply the discount:
You can enter roles directly by typing in their code names separated by semicolons, e.g., _authenticated_;Members. You can add registered customers to roles in the Customers application while editing a selected customer on the Roles tab. |
Discount processing |
|
Apply lower priority discounts |
If selected, other Buy X Get Y discounts with lower priorities are applied to the shopping cart as well. If cleared, discount processing stops with this discount. |
Limit use per order |
Set how many times customer is allowed to apply the discount in one order. Example Example with Minimum unit quantity set to 2 and a 100% discount to the cheapest product.
|
Buy X Get Y discounts API
Buy X Get Y discounts are called MultiBuyDiscounts in the API. The API comprises the following objects:
- MultiBuyDiscountInfo – stores information about the discount
- DiscountSummaryItem – simplified view on the discount data, contains only the name and value of the discount
- ShoppingCartInfo.OrderRelatedDiscountSummaryItems property – collection of DiscountSummaryItem objects applied to products in the current shopping cart