Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Dynamically add a simple product to a bundle product before adding to cart
 
oliverjn
Jr. Member
 
Total Posts:  29
Joined:  2012-11-28
 

Hey there,

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.

Thanks for any link/help/hint! smile

Oliver

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

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?

 
Magento Community Magento Community
Magento Community
Magento Community
 
oliverjn
Jr. Member
 
Total Posts:  29
Joined:  2012-11-28
 

Thanks Brent!

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
oliverjn
Jr. Member
 
Total Posts:  29
Joined:  2012-11-28
 

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?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top