コード例 #1
0
ファイル: Order.php プロジェクト: badelas/thelia
 /**
  * Create an order outside of the front-office context, e.g. manually from the back-office.
  */
 public function createManual(OrderManualEvent $event)
 {
     $paymentModule = ModuleQuery::create()->findPk($event->getOrder()->getPaymentModuleId());
     /** @var \Thelia\Module\PaymentModuleInterface $paymentModuleInstance */
     $paymentModuleInstance = $paymentModule->createInstance();
     $event->setPlacedOrder($this->createOrder($event->getDispatcher(), $event->getOrder(), $event->getCurrency(), $event->getLang(), $event->getCart(), $event->getCustomer(), $paymentModuleInstance->manageStockOnCreation()));
     $event->setOrder(new OrderModel());
 }
コード例 #2
0
ファイル: Order.php プロジェクト: alex63530/thelia
 /**
  * Create an order outside of the front-office context, e.g. manually from the back-office.
  */
 public function createManual(OrderManualEvent $event)
 {
     $event->setPlacedOrder($this->createOrder($event->getDispatcher(), $event->getOrder(), $event->getCurrency(), $event->getLang(), $event->getCart(), $event->getCustomer()));
     $event->setOrder(new \Thelia\Model\Order());
 }