我有一个问题,我想显示原始尺寸的图像产品,而不在product.php文件中调整它
$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));
然后我想用另一个语句添加$ this-> config-> get('config_image_thumb_width')来获取原始大小以在特定情况下更改它
提前致谢
答案 0 :(得分:1)
这应该足够了(一定要改变条件
$this->data['thumb'] = HTTP_SERVER . 'image/' . $product_info['image'];
if(.. CONDITIONS HERE FOR RESIZED ..) {
$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));
}