I need help in adding cart with the additional custom option included on it
I've looked around stackoverflow and stackexchange for the answer but sadly it failed and they only add product simply, and without its custom option.
this however https://stackoverflow.com/questions/13698236/add-product-to-cart-with-custom-options sounds that possibly might work. but my problem is, i do not know the singleTon or Helper declared in the variable $quoteItem
any help will do, thanks! :)
Here's my script just in case:
$cart = Mage::getSingleton('checkout/cart'); $cart->init(); $addItem = array( 'product' => $product_id, 'qty' => $qty, 'options' => array("Color" => $color) ); $_product = Mage::getSingleton('catalog/product')->load($product_id); $cart->addProduct($_product, new Varien_Object($addItem)); $cart->save();