New answers tagged

3

Try below code in your observer, it'll work for you. public function checkproductinorder($Observer) { $order = $Observer->getEvent()->getOrder(); $items = $order->getAllItems(); $skus = array('600','800'); //product SKUs $skuList = array(); foreach ($items as $item) { if(in_array($item->getSku(), $skus)) { ...


2

Try this code public function checkproductinorder($Observer) { $order = $Observer->getEvent()->getOrder(); $items = $order->getAllItems(); $skus = array(); foreach ($items as $item) { if($item->getSku() == '600' || $item->getSku() == '800') { $skus[] = $item->getSku(); } } Mage::...


Top 50 recent answers are included