Esempio n. 1
0
 /**
  * Update order's shipping state.
  *
  * @param OrderInterface $order
  * @param string         $transition
  */
 public function updateOrderShipmentStates(OrderInterface $order, $transition = ShipmentTransitions::SYLIUS_PREPARE)
 {
     if ($order->isBackorder()) {
         $transition = ShipmentTransitions::SYLIUS_BACKORDER;
     }
     $this->processor->updateShipmentStates($order->getShipments(), $transition);
 }
Esempio n. 2
0
 /**
  * Update shipment states after order is created.
  *
  * @param GenericEvent $event
  */
 public function updateShipmentStatesOnhold(GenericEvent $event)
 {
     $this->shippingProcessor->updateShipmentStates($this->getOrder($event)->getShipments(), ShipmentTransitions::SYLIUS_HOLD);
 }