I am starting to learn opencart. I am looking at the code and am wondering how was the vouchur code passed from cart to checkout page. Can anyone enlighten me ?
Thanks.
Code: Select all
?php
class ControllerCheckoutCheckout extends Controller {
public function index() {
// Validate cart has products and has stock.
if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
$this->response->redirect($this->url->link('checkout/cart'));
}