public function deleteAction(CartProductInterface $cartProduct) : Response { try { $this->manager->deleteCartProduct($cartProduct); } catch (DeleteCartItemException $exception) { $this->getFlashHelper()->addError($exception->getMessage()); } return $this->redirectToAction('index'); }
/** * @param OrderInterface $order */ public function saveOrder(OrderInterface $order) { $this->createResource($order); $cart = $this->getCartContext()->getCurrentCart(); $this->cartManager->abandonCart($cart); $this->getRequestHelper()->setSessionAttribute('orderId', $order->getId()); }
public function onKernelController() { $this->cartManager->initializeCart(); }
public function onKernelController(FilterControllerEvent $event) { $this->cartManager->initializeCart(); }