How do I set the quantity of the option in my bundle product?

fiefie

New Member
I have this code, which would add one bundle product with the ID of 171 to the cart, given the option of a product with the color(23) Magenta(63). Is there any way to set a quantity to the option, like say we want to set the quantity to 2 of those items with that color?Thanks for the help.\[code\]$params = array( 'product' => 171, 'bundle_option' => array( 23 => array( 0 => 63 ), ), 'qty' => 1, ); $cart = Mage::getSingleton('checkout/cart'); $product = Mage::getModel('catalog/product'); $product->load(171); $cart->addProduct($product, $params); $cart->save();\[/code\]
 
Back
Top