Controller/CartController.php
public function shipmentAction(Request $request)
    {
        if (null !== $redirect = $this->validateStep('shipment')) {
            return $redirect;
        }

        $cart = $this->getCart();

        // Go to payment page if no shipment required
        if (!$cart->requiresShipment()) {
            return $this->redirect($this->generateUrl('ekyna_cart_payment'));
        }

        /* TODO
        $form = $this->createForm('ekyna_cart_shipment', $cart);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $event = new OrderEvent($cart);
            $this->getDispatcher()->dispatch(OrderEvents::CONTENT_CHANGE, $event);
            if (!$event->isPropagationStopped()) {
                return $this->redirect($this->generateUrl('ekyna_cart_payment'));
            } else {
                $event->toFlashes($this->getFlashBag());
            }
            return $this->redirect($this->generateUrl('ekyna_cart_shipment'));
        }*/

        return $this->render('EkynaCartBundle:Cart:shipment.html.twig', [
//           'form' => $form->createView(),
//           'cart' => $cart,
//         	 'user' => $user,
        ]);
    }
public function shipmentAction(Request $request)
    {
        if (null !== $redirect = $this->validateStep('shipment')) {
            return $redirect;
        }

        $cart = $this->getCart();

        // Go to payment page if no shipment required
        if (!$cart->requiresShipment()) {
            return $this->redirect($this->generateUrl('ekyna_cart_payment'));
        }

        /* TODO
        $form = $this->createForm('ekyna_cart_shipment', $cart);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $event = new OrderEvent($cart);
            $this->getDispatcher()->dispatch(OrderEvents::CONTENT_CHANGE, $event);
            if (!$event->isPropagationStopped()) {
                return $this->redirect($this->generateUrl('ekyna_cart_payment'));
            } else {
                $event->toFlashes($this->getFlashBag());
            }
            return $this->redirect($this->generateUrl('ekyna_cart_shipment'));
        }*/

        return $this->render('EkynaCartBundle:Cart:shipment.html.twig', [
//           'form' => $form->createView(),
//           'cart' => $cart,
//         	 'user' => $user,
        ]);
    }
public function shipmentAction ( Request $ request ) { if ( null !== $ redirect = $ this -> validateStep ( 'shipment' ) ) { return $ redirect ; } $ cart = $ this -> getCart ( ) ; // Go to payment page if no shipment required if ( ! $ cart -> requiresShipment ( ) ) { return $ this -> redirect ( $ this -> generateUrl ( 'ekyna_cart_payment' ) ) ; } /* TODO
        $form = $this->createForm('ekyna_cart_shipment', $cart);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $event = new OrderEvent($cart);
            $this->getDispatcher()->dispatch(OrderEvents::CONTENT_CHANGE, $event);
            if (!$event->isPropagationStopped()) {
                return $this->redirect($this->generateUrl('ekyna_cart_payment'));
            } else {
                $event->toFlashes($this->getFlashBag());
            }
            return $this->redirect($this->generateUrl('ekyna_cart_shipment'));
        }*/ return $ this -> render ( 'EkynaCartBundle:Cart:shipment.html.twig' , [ //           'form' => $form->createView(), //           'cart' => $cart, //         	 'user' => $user, ] ) ; }
Shipment action.

@param Request $request
@return \Symfony\Component\HttpFoundation\RedirectResponse|Response
Shipment action .