/** * Summary step of the checkout * * @return void */ public function summaryTask() { $cart = new CurrentCart(); $transaction = $cart->liftTransaction(); if (!$transaction) { $cart->redirect('home'); } // Generate security token $token = $cart->getToken(); // Check if there are any steps missing. Redirect if needed $nextStep = $cart->getNextCheckoutStep()->step; if ($nextStep != 'summary') { $cart->redirect($nextStep); } $cart->finalizeTransaction(); $this->view->token = $token; $this->view->transactionItems = $transaction->items; $this->view->transactionInfo = $transaction->info; $this->view->display(); }
/** * Summary step of the checkout * * @return void */ public function summaryTask() { $cart = new CurrentCart(); $transaction = $cart->liftTransaction(); if (!$transaction) { $cart->redirect('home'); } // Generate security token $token = $cart->getToken(); // Check if there are any steps missing. Redirect if needed $nextStep = $cart->getNextCheckoutStep()->step; if ($nextStep != 'summary') { $cart->redirect($nextStep); } $cart->finalizeTransaction(); if (Pathway::count() <= 0) { Pathway::append(Lang::txt(strtoupper($this->_option)), 'index.php?option=' . $this->_option); } if ($this->_task) { Pathway::append(Lang::txt('Review your order')); } $this->view->token = $token; $this->view->transactionItems = $transaction->items; $this->view->transactionInfo = $transaction->info; $this->view->display(); }