Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. $itemOptions = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
  2. $addProductSku = 'Silky-#1-000';
  3. $options = array(
  4. 'product' => Mage::getModel('catalog/product')->getIdBySku($addProductSku),
  5. 'super_attribute' => $itemOptions['info_buyRequest']['super_attribute'],
  6. 'qty' => $item->getQty(),
  7. );
  8. $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$addProductSku);
  9. if ($product -> isSaleable()) {
  10. $cart -> addProduct($product, $options);
  11. $cart->save();
  12. $session->setCartWasUpdated(true); // Not really necessary - Vicary
  13.  
  14. }
  15.  
  16. Invalid method Varien_Object::checkQtyIncrements(Array
  17. (
  18. [0] => 1
  19. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement