Skip to content

for implementing buy x get y logic, Is it safe to add the same product with price 0 in quote?

I’m implementing a Buy 2 Get 1 Free promotion in Magento 2.
The idea is:

When a customer adds a product (say SKU: product-abc) to their cart,

For every 2 they add, I want to automatically add 1 more of the same product SKU to the cart, but with price = 0.

So if the customer adds 4 items of product-abc, the cart should show:

4 x product-abc (paid)

2 x product-abc (price = 0, free)

My Question:

Is this approach safe and stable in Magento 2?

Any known side effects of adding the same SKU twice in the quote (one paid, one free)?

Will Magento confuse them and merge them together?

Could this cause issues in:

  • Tax or total calculations?

    Order placement or quote conversion?

    Inventory reservation?

    Shipping or invoice generation?

I want to keep the free item visibly separate in the cart, not just reduce unit price — so the customer clearly sees what they’re getting for free.

Has anyone done this in production or seen any pitfalls?

Thanks in advance!