Creating Purchase X Receive Y Free
In this topic, we will learn about how to create a Purchase Product A Receive Product B Free discount for products.
What is Purchase X Receive Y Free?
When a user adds specified quantities a product to the cart receives specified numbers of that product or another product with free price or with specified discount.
- Browse to, WordPress admin dashboard.
- Go to WC Conditions » WC Conditions.
- Click on Pricing tab to view its content.
- Click on Add New button to add a new Pricing Rule.
- Set a name for your Purchase Pricing Rule.
- Select Purchase x Receive y for Mode.
- Purchase Quantity Based On indicates that how purchased items quantities in the cart will be calculated.
- Single product: Quantity is calculated separately for each product.
- Single product variation: Quantity is calculated separately for each product variation, for simple products quantity will be calculated based on the product.
- Cart line item: Quantity is calculated separately for each product line in the cart.
- Sum of categories quantities: Quantity is calculated separately for each category in the cart.
- Sum of all products quantities: Quantity is calculated based on the sum of all quantities in the cart.
- Receive Quantity Based On indicates that how products quantities that receive this discount will be calculated in the cart.
- Single product: Quantity is calculated separately for each product.
- Single product variation: Quantity is calculated separately for each product variation, for simple products quantity will be calculated based on the product.
- Cart line item: Quantity is calculated separately for each product line in the cart.
- Sum of categories quantities: Quantity is calculated separately for each category in the cart.
- Sum of all products quantities: Quantity is calculated based on the sum of all quantities in the cart.
- Purchased Products Message This message will be shown in products pages that user should buy them to get this discount.
- Receive Products Message This message will be shown in products pages that will receive this discount.
Because our purchased product is same as receive product we only setting message for Purchased Products Message.
- Repeat means that this discount will be applied more than once when possible. For example in this example Buy 3 Get 1 Free if the user bought 6 quantities of purchase products and repeat is enabled he will get 2 products free, but when the repeat is disabled he will get only 1 product free.
- In this table, you can set purchase rule like purchase and receive quantity and discount type and discount amount.
- Set how many quantities of purchase products should user buys to get this discount.
- Set how many quantities of receive products will be discounted for the user.
- Set discount type.
- Percentage discount : Applies percentage of product price as discount.
- Price discount : Applies a price as discount to product price.
- Fixed price: Changes product price to specified value.
- Set discount amount.
- By Add New Purchased Item you can add products to the list that user should buy them to get this discount, refer to Adding Products for more information.
- Select products that user should buy them to get this discount we chose Happy Ninja #37.
- Click on Add button to add selected products to Purchased Items list.
- By Add New Discounted Item you can add products to the list that this discount will apply to their price, refer to Adding Products for more information.
- Select products that will receive this discount we chose Happy Ninja #37.
- Click on Add button to add selected products to Discounted Items list.
- By Add New Date Time you can add Date Time Conditions to your Pricing Rule. For example, you can apply this discount to the product in specific days of the year by using Specific Date, refer to Adding Date Time Conditions for more information.
- By Add New Condition you can add Conditions to your Pricing Rule. For example, you can apply this discount to the product for specific users or roles and etc, refer to Adding Conditions for more information.
- Purchased Items lists products that user should buy them to get this discount.
- You can see selected products here that you add them in step 16.
- Discounted Items lists products that will receive this discount.
- You can see selected products here that you add them in step 19.
- Date Time lists date time conditions that you set for this Pricing Rule via Add New Date Time.
- Conditions lists conditions that you set for this Pricing Rule.
- Click on Save button to saving this Pricing Rule.
Now because we chose Happy Ninja #37 in our discount we are going to opening its page.
- Now we can see Purchased Products Message that informs the user about the discount.
- We are going to add 6 quantities of this product to see the result.
- As you can see in above image product price discounted to $12.00 and the total price is $72.00, in other words, the user pays 4 quantities price 18 * 4 = 72 and gets 2 products with a free price.
Settings of Product Pricing
Important: Refer to Settings of product pricing for more information.