Opencart minimum order price

后端 未结 2 629
不知归路
不知归路 2021-01-07 07:24

I am trying to implement below code from here in catalogue/view/theme/default/template/checkout/confirm.tpl

cart->getSubtotal() >         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-07 07:38

    Not the same way but you can do it like this:

    Add this line in your checkout.php controller file.

    if ($this->cart->getSubtotal() < 1000) {
        $this->session->data['error'] = 'Your warning message';
        $this->response->redirect($this->url->link('checkout/cart'));
    }
    

    After

    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'));
    }
    

    Thats it.

提交回复
热议问题