Image 如何在opencart2.0.2.0中的制造商页面中获取制造商图像?

Image 如何在opencart2.0.2.0中的制造商页面中获取制造商图像?,image,syntax-error,opencart2.x,Image,Syntax Error,Opencart2.x,我正在使用opencart版本2.0.2.0,现在我正在尝试在制造商页面中获取图像或图像url 我已经在catalog/controller/product/manufacturer.php中添加了代码 并在catalog/view/theme/default/template/product/manufacturer\u list.tpl中调用它 但是在my/index.php?route=product/manufacturer页面中出现了错误 注意:未定义变量:制造商\u img in /

我正在使用opencart版本2.0.2.0,现在我正在尝试在制造商页面中获取图像或图像url

我已经在catalog/controller/product/manufacturer.php中添加了代码

并在catalog/view/theme/default/template/product/manufacturer\u list.tpl中调用它

但是在my/index.php?route=product/manufacturer页面中出现了错误

注意:未定义变量:制造商\u img in /data1/opencart-2.0.2.0/catalog/view/theme/default/template/product/manufacturer_list.tpl 在线阵列

让我们澄清一下,ControllerProductManufacturer index显示列表,info显示制造商的详细信息

//catalog/controller/product/manufacturer.php:46
替换

$data['categories'][$key]['manufacturer'][] = array(

在目录/视图/主题/默认值/模板/产品/制造商列表中。tpl:30 内环

<?php if($manufacturer['image']):?>
  <img src="<?php echo $manufacturer['image']; ?>" alt="<?php echo $manufacturer['name'];?>">
<?php endif;?>

似乎你们对制造商列表页面和详细信息页面感到困惑,我一点也不困惑,我想在制造商列表页面中显示图像,谢谢!
$data['categories'][$key]['manufacturer'][] = array(
$manufacturer_image = $this->model_catalog_manufacturer->getManufacturer($result['manufacturer_id']);

if($manufacturer_image){
 $mfg_img = $this->model_tool_image->resize($manufacturer_image['image'], 120, 120);
}else{
 $mfg_img = false;
}

$data['categories'][$key]['manufacturer'][] = array(
'image'=>$mfg_img,
<?php if($manufacturer['image']):?>
  <img src="<?php echo $manufacturer['image']; ?>" alt="<?php echo $manufacturer['name'];?>">
<?php endif;?>