0

我正在尝试加载image popup类别页面,现在只有image thumb我可以访问。

<div class="image">
  <a href="<?php echo $product['popup']; ?>">
   <img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" />
  </a>
</div>

我从产品复制代码

if ($category_info['image']) {
    $this->data['popup'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
} else {
    $this->data['popup'] = '';
}

并粘贴在 controller/product/category.php 下,但我只是收到错误消息

<b>Notice</b>: Undefined index: popup in <b>/home ...

Opencart 版本:v1.5.5.1

4

1 回答 1

0

Finally i found the solution,

go to controller\product\category.php line 212 paste

if ($result['image']) {
    $popup = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_width'));
} else {
    $popup = false;
}

then line 244 after

$this->data['products'][] = array(
    'product_id'  => $result['product_id'],
    'thumb'       => $image,

paste

'popup'       => $popup,
于 2013-04-11T13:59:44.377 回答