How do I setup a buy x get x free option

  • Posts: 52
  • Thank you received: 1
  • Hikashop Business
1 week 1 day ago #369993

Hi there,

On my site I want to create an discount where you can buy 2 items and get 1 item for free.

I've seen the solution where you set a different price with a minimum of x items, but then when you add more than the minimum amount of items, that price stays the same.

For example: Let's say an item costs $10,-. You set a price of $20,- with a minimum op 3 items. When you add a fourth or fifth item the price stays $20,-. So every item over 2 is free.

How do I go about this?

With kind regards,
Rachel Walraven

Please Log in or Create an account to join the conversation.

  • Posts: 84958
  • Thank you received: 13848
  • MODERATOR
1 week 1 day ago #369997

Hi Rachel,

There are several ways to achieve a "Buy 2, Get 1 Free" promotion in HikaShop. Here are the options:

Option 1: Cart Fee Plugin (Recommended) www.hikashop.com/marketplace/product/279-cart-fee.html
This plugin allows you to add fees (or discounts with negative values) to the cart using formulas.
For "Buy 2, Get 1 Free", configure a formula like this:
Label: Buy 2 Get 1 Free
Formula: -1 * floor({product.cart_product_quantity} / 3) * {product.unit_price}

This calculates how many free items the customer should get (1 free for every 3 items) and applies the unit price as a negative fee (discount).

Examples:
2 items at $10 = no discount (floor(2/3) = 0)
3 items at $10 = $10 discount (floor(3/3) = 1 free item)
5 items at $10 = $10 discount (floor(5/3) = 1 free item)
6 items at $10 = $20 discount (floor(6/3) = 2 free items)

You can also add a condition to restrict this to specific products. For example:
Condition: {product.product_id} == 123

The advantage of this approach is that the discount appears as a separate labeled line in the cart, making it transparent to customers.


Option 2: Price Calculations Plugin www.hikashop.com/marketplace/product/148...ce-calculations.html
This plugin dynamically adjusts product prices based on formulas.
For "Buy 2, Get 1 Free", you would use:
Condition: {cart_product_quantity} >= 3
Formula: {price} * (1 - floor({cart_product_quantity} / 3) / {cart_product_quantity})

This calculates the effective per-unit price when every 3rd item is free. For example, with 3 items at $10, each item would be displayed at approximately $6.67, resulting in a $20 total.
This approach modifies the displayed unit price rather than showing a separate discount line.

Option 3: Discount with Minimum Quantity
You can also create a standard discount via Sales > Discounts:
Create a fixed amount discount equal to the product price ($10)
Set a minimum quantity restriction of 3
Optionally restrict to specific products or categories
However, this approach only gives one free item regardless of how many sets of 3 the customer buys. You would have to create several discounts with different min/max to handle "buy 6 get 2 free", etc. And you have to set the price of the product in the discount. So it make for a more cumbersome maintenance in the long run, when you change prices, or if you need to support many products with different prices.
For true "every 3rd item free" behavior, options 1 or 2 are better suited.

I would recommend Option 1 (Cart Fee Plugin) as it's the most straightforward and provides clear visibility to customers about the promotion they're receiving.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 1
  • Hikashop Business
1 week 12 hours ago #370004

Thanks so much for your elaborate explanation!

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum