public function index() { $this->order->loadAll(); if (!$this->order->getShoppingCartItemCount()) { return new ActionRedirectResponse('index', 'index'); } foreach ($this->order->getShipments() as $shipment) { if (!$shipment->getSelectedRate()) { $shipment->shippingAmount->set(0); } } $this->order->calculateTotal(true); $this->session->set('OrderPaymentMethod_' . $this->order->getID(), ''); $response = new CompositeActionResponse(); $blocks = array('login', 'shippingAddress', 'billingAddress', 'payment', 'cart', 'shippingMethods', 'overview'); $blocks = array_flip($blocks); if ($this->config->get('REQUIRE_SAME_ADDRESS')) { unset($blocks['billingAddress']); } foreach ($blocks as $block => $key) { $blockResponse = $this->{$block}(); if ($blockResponse instanceof ActionResponse) { $blockResponse->set('user', $this->user->toArray()); $response->addResponse($block, $blockResponse, $this, $block); } } $response->set('orderValues', $this->getOrderValues($this->order)); return $response; }