Our app utilizes the Cart Transform Merge Operation to merge bundles in the cart.
One of our clients sells a product both as single units and in packs (e.g., 2-pack, 4-pack). When a buyer adds a quantity of 2 to the cart, it’s merged into a 2-pack. Similarly, if they add a quantity of 4, it’s merged into a 4-pack.
The client wants to allow customers to purchase 6 of the same product, and in this scenario, the cart should contain a 4-pack and a 2-pack after the merge.
However, we’re unable to achieve this functionality. According to the documentation:
Multiple merge operations targeting the same cart line: The first merge operation in the list is executed, and all other merge operations for the same cart line are discarded.
In this case, the cart has a single line with a quantity of 6. This means we can’t target the same line for two separate bundles (packs), and as a result, only one bundle is being merged.
Is there any solution or workaround for this?