Try follow the next steps:
1. Let's say we have Product1, Product2, Product3.
2. Create a new discount. Ensure that 'Discount type' type is set to 'Assigned to product variants'. Check 'Use percentage' and set 'Discount percentage' to '100%'. Then go 'requirements' tab and create 'Customer has all of these product variants in the cart' requirement with IDs of Product1 and Product2.
3. Apply this discount to Product3 (on the product variant details page, discounts tab)
Note: The only issue here is that you have to manually add Product3 to the cart
1. Let's say we have Product1, Product2, Product3.
2. Create a new discount. Ensure that 'Discount type' type is set to 'Assigned to product variants'. Check 'Use percentage' and set 'Discount percentage' to '100%'. Then go 'requirements' tab and create 'Customer has all of these product variants in the cart' requirement with IDs of Product1 and Product2.
3. Apply this discount to Product3 (on the product variant details page, discounts tab)
Note: The only issue here is that you have to manually add Product3 to the cart
This is not a very generic solution. It only works for: if you buy one product of each of N products you get Product x for free. It will not work in many real cases such as:
- Buy 2 (it only works if you buy one) of Product 1 and the 3rd (product 1) is free. Same if you buy 4 of product 1 you get a second for free
- Buy 2 (or 3 or 4 ...) of any of Product 1, Product 2 ... and you get Product x for free