Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $itemOptions = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
- $addProductSku = 'Silky-#1-000';
- $options = array(
- 'product' => Mage::getModel('catalog/product')->getIdBySku($addProductSku),
- 'super_attribute' => $itemOptions['info_buyRequest']['super_attribute'],
- 'qty' => $item->getQty(),
- );
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$addProductSku);
- if ($product -> isSaleable()) {
- $cart -> addProduct($product, $options);
- $cart->save();
- $session->setCartWasUpdated(true); // Not really necessary - Vicary
- }
- Invalid method Varien_Object::checkQtyIncrements(Array
- (
- [0] => 1
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement