当OpenCart 3.0.2.0的购物篮至少为10美元时如何下订单?

问题描述 投票:0回答:1

我正在使用OpenCart 3.0.2.0版。我的问题是,如果客户创建的购物篮金额达到$ 10并通过,我如何使它接受为订单。

opencart opencart-3
1个回答
1
投票

使用标准工具,您可以为送货和付款方式设置最低价格。如果您的送货方式或付款方式的最低价格为10 $,则总结帐将变得不可能,因为。注意。并非每个送货或付款都具有这些设置。

更复杂的方式:

catalog / controller / checkout / checkout.php

查找(第4-7行)

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

在下面添加

if ($this->cart->getSubtotal() < 10) {
    $this->session->data['error'] = 'Your warning message';
    $this->response->redirect($this->url->link('checkout/cart'));
}
© www.soinside.com 2019 - 2024. All rights reserved.