Esempio n. 1
0
 /**
  * @param FormInterface $guestForm
  * @param OrderInterface $order
  *
  * @return ActionResult
  */
 protected function processGuestOrder(FormInterface $guestForm, OrderInterface $order)
 {
     $customer = $guestForm->getData();
     $order->setCustomer($customer);
     $this->dispatchCheckoutEvent(SyliusCheckoutEvents::SECURITY_PRE_COMPLETE, $order);
     $this->saveResource($order);
     $this->get('session')->set('sylius_customer_guest_id', $customer->getId());
     return $this->complete();
 }