I’m trying the merge operations to group multiple components into a bundle. My use case is to select any N variants from a collection, e.g. customers select any 3 variants from a Tee collection, and get a discount
When I add the components to the cart, where should I store the discount for this specific bundle?
I think your doc is wrong for customized bundles. This part states that:
Discount calculated on the parent then allocated on the components.
When I add the components to the cart for a merge operation, the bundle parent is not available so as the discount. What is a good technical approach? I store all bundle discounts to a shop/app/cart transform metafield for query?
And the metafield has a size limitation of 10KB. A store with multiple bundles can easily reach this limit.