未定义的变量:导致 opencart 2.3

Undefined variable: result in opencart 2.3

我对 opencart 2.3 有疑问

Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69Notice: Undefined variable: result in C:\xampp\htdocs\thamr\catalog\controller\extension\module\featured.php on line 69

featured.php

$data['products'][] = array(
    'product_id'  => $product_info['product_id'],
    'thumb'       => $image,
    'name'        => $product_info['name'],
    'description' => utf8_substr(strip_tags(html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
    'price'       => $price,
    'special'     => $special,
    'tax'         => $tax,
    'minimum'     => $result['minimum'] > 0 ? $result['minimum'] : 1,   
    'rating'      => $rating,
    'href'        => $this->url->link('product/product', 'product_id=' . $product_info['product_id'])

正如您的错误消息告诉您的那样,$result 变量未定义。

在数组中使用它之前定义它。