[英]get original width and height of the product image in opencart
我有一个问题,我想以原始大小显示图像产品而不在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')以获取原始大小以在特定情况下更改它
提前致谢
这应该足够了(一定要更改条件
$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'));
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.