未定义的变量:导致opencart 2.3

时间:2018-02-03 20:52:52

标签: php variables undefined opencart2.x

我的opencart 2.3有问题

  

注意:未定义的变量:结果在第69行的C:\ xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module \ featured.php注意:未定义的变量:结果在C:\ xampp \ htdocs \ thamr \ catalog \第69行上的controller \ extension \ module \ featured.php注意:未定义的变量:结果在第69行的C:\ xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module \ featured.php注意:未定义的变量:结果为C:\第69行的xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module \ featured.php注意:未定义的变量:结果在第69行的C:\ xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module \ featured.php中注意:未定义的变量:导致C:\ xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module \ features.php在第69行上注意:未定义的变量:结果在C:\ xampp \ htdocs \ thamr \ catalog \ controller \ extension \ module第69行\ feature.php

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'])

1 个答案:

答案 0 :(得分:0)

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

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