opencart3图片Google Merchant Center验证通过不了的解决方法

  最近在做一个opencart项目,有对接Google Merchant Center,但是一直提示产品图片验证无法通过,ytkah看了一下图片路径,/image/cache/catalog/demo/iphone_1-200x200.jpg,里面加了一个cache和压缩的尺寸,有可能就是这个原因。马上改,找到文件/catalog/controller/product/product.php,第256行左右(为了不改变源码,用//注释了源代码,填加新的popup调用方式)

              if ($product_info['image']) {
				//$data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height'));
				$data['popup'] = 'image/' . $product_info['image'];
			} else {
				$data['popup'] = '';
			}

  和第272行左右

              foreach ($results as $result) {
				$data['images'][] = array(
					//'popup' => $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height')),
					'popup' => 'image/' . $result['image'], 
					'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_additional_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_additional_height'))
				);
			}

  后台刷新缓存,extensions - modification - refresh,看看图片是不是变成/image/catalog/demo/iphone_1.jpg

转载于:https://www.cnblogs.com/ytkah/p/10755142.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值