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.
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?