let’s say I have a pre-defined Bundle Product. The customer will be able to select a simple product to add to the already defined Bundle Product. The Simple Products are not assigned to the Bundle Project.
So would it be possible to add a Simple Product to a Bundle Product programmatically before adding the Bundle Product to the cart?
The reason why the Simple Products havn’t been assigned before-hand is that a Bundle Product option might have 5000+ possible Simple Products, so we’d like to do it more dynamic just before a user adds the Bundle Product to the cart.
Perhaps the first question should be asked: Why does the simple product have to be part of the bundled product? If the customer is going to buy it why does it have to be part of the bundle?
In your scenario, wouldn’t every simple product eventually get associated with a bundled product?
Well, basically it\’s a tire shop that offers tires as individual products (as simple products in Magento) plus you can buy \"wheels with rim and tire\”. A wheel would be a bundle product; rim and tire would be configurable, and the wheel can be added to the cart as a whole.
As there can be many tires used with a rim, we can\’t possibly associate all possible options to the bundle product, so we\’d like to add them dynamically when the user chooses to add the configuration to the cart.
To be more specific, this is the current bundle product structure:
- wheel rim design (bundle product) - rim size (bundle option group) - rim produc A (associated simple product) - rim produc B (associated simple product) - rim produc C (associated simple product) - equipment (bundle option group) - equipment A (associated simple product) - equipment B (associated simple product) - tire (bundle option group) - empty, not yet assigned, should be added dynamically in frontend via PHP
So would it be possible to add a simple product to the \"tire\" bundle option group with PHP?
Anyone else having a hint on how to add a simple product to a pre-defined bundle option in a bundle product without overwriting the other bundle options?