[Skip to main content](#vessel-content)

#   How do I setup a buy x get x free option

##

- **[webwerk](/forum/user/37949-webwerk "View webwerk's Profile")**
- [![webwerk's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/duck.gif)](/forum/user/37949-webwerk "View webwerk's Profile") Topic Author
- [ Offline](/forum/user/37949-webwerk)

Less More

- Posts: 52
- Thank you received: 1
-

9 months 3 weeks ago [\#369993](#369993) by [webwerk](/forum/user/37949-webwerk "View webwerk's Profile")  *[How do I setup a buy x get x free option](/forum/46-discount-coupon/910030-how-do-i-setup-a-buy-x-get-x-free-option#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")* was created by *[webwerk](/forum/user/37949-webwerk "View webwerk's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MTAwMzAtaG93LWRvLWktc2V0dXAtYS1idXkteC1nZXQteC1mcmVlLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

9 months 3 weeks ago [\#369997](#369997) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How do I setup a buy x get x free option](/forum/46-discount-coupon/910030-how-do-i-setup-a-buy-x-get-x-free-option#369997 "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")*

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](https://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](https://www.hikashop.com/marketplace/product/148-price-calculations.html)
This plugin dynamically adjusts product prices based on formulas.
For "Buy 2, Get 1 Free", you would use:
Condition: {cart_product_quantity} &gt;= 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 &gt; 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MTAwMzAtaG93LWRvLWktc2V0dXAtYS1idXkteC1nZXQteC1mcmVlLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[webwerk](/forum/user/37949-webwerk "View webwerk's Profile")**
- [![webwerk's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/duck.gif)](/forum/user/37949-webwerk "View webwerk's Profile") Topic Author
- [ Offline](/forum/user/37949-webwerk)

Less More

- Posts: 52
- Thank you received: 1
-

9 months 2 weeks ago [\#370004](#370004) by [webwerk](/forum/user/37949-webwerk "View webwerk's Profile")  Replied by *[webwerk](/forum/user/37949-webwerk "View webwerk's Profile")* on topic *[How do I setup a buy x get x free option](/forum/46-discount-coupon/910030-how-do-i-setup-a-buy-x-get-x-free-option#370004 "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")*

Thanks so much for your elaborate explanation!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MTAwMzAtaG93LWRvLWktc2V0dXAtYS1idXkteC1nZXQteC1mcmVlLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
