错误通知:未定义的索引:payment_method

时间:2019-10-06 22:12:00

标签: php opencart

对默认的opencart模块进行了一些更改,都可以正常工作,但是出现了此错误:

  

注意:未定义的索引:第4行的public_html / catalog / model / extension / total / handling.php中的付款方式

<?php
class ModelExtensionTotalHandling extends Model {
    public function getTotal($total) {
        if ($this->session->data['payment_method']['code'] == 'bank_transfer') { $status = false; } else {
        $sub_total = $this->cart->getSubTotal();

        if (($sub_total > $this->config->get('handling_total')) && ($sub_total > 0)) {
            $this->load->language('extension/total/handling');

            $total['totals'][] = array(
                'code'       => 'handling',
                'title'      => $this->language->get('text_handling'),
                'value'      => $total['total'] / 100 * $this->config->get('handling_fee'),
                'sort_order' => $this->config->get('handling_sort_order')
            );


            $total['total'] = $total['total'] / 100 * $this->config->get('handling_fee');
        }
    }}
}

0 个答案:

没有答案