private function createMagentoOrder(Ess_M2ePro_Model_Order $order) { if ($order->canCreateMagentoOrder()) { try { $order->createMagentoOrder(); } catch (Exception $e) { Mage::helper('M2ePro/Exception')->process($e, true); } } if ($order->getChildObject()->canCreatePaymentTransaction()) { $order->getChildObject()->createPaymentTransactions(); } if ($order->getChildObject()->canCreateInvoice()) { $order->createInvoice(); } if ($order->getChildObject()->canCreateShipment()) { $order->createShipment(); } if ($order->getChildObject()->canCreateTracks()) { $order->getChildObject()->createTracks(); } $order->updateMagentoOrderStatus(); }
private function createMagentoOrder(Ess_M2ePro_Model_Order $order) { if ($order->canCreateMagentoOrder()) { try { $order->createMagentoOrder(); } catch (Exception $exception) { return; } } if ($order->getChildObject()->canCreatePaymentTransaction()) { $order->getChildObject()->createPaymentTransactions(); } if ($order->getChildObject()->canCreateInvoice()) { $order->createInvoice(); } if ($order->getChildObject()->canCreateShipment()) { $order->createShipment(); } if ($order->getChildObject()->canCreateTracks()) { $order->getChildObject()->createTracks(); } $order->updateMagentoOrderStatus(); }