代码之家  ›  专栏  ›  技术社区  ›  OPR

在opencart 2.x中加载产品的所有图像而不调整大小

  •  0
  • OPR  · 技术社区  · 9 年前

    我正在尝试加载产品页面中的所有图像,但我不想调整它们的大小。 有人知道一个简单的解决办法吗? opencart版本为2.1.0.2

    2 回复  |  直到 9 年前
        1
  •  0
  •   linktoahref Nimya V    9 年前

    为了检索图像而不在产品页面上重新调整大小,您可以 不需要 重新调整产品控制器文件中的图像大小。

    因此,在Product Controller文件中,在 /catalog/controller/product/product.php

    public function index()

    小心 $this->model_tool_image->resize 删除 函数调用 并使用指向图像的链接返回到模板 HTTPS_SERVER . 'image/'. $image_variable 假如 HTTPS_SERVER 定义于 /config.php

    注: $image_variable 可以是 $product_info['image'] $result['image'] ,用你最好的判断。

    提示:使用 vqmod 就像修改核心控制器文件一样

        2
  •  0
  •   Community datashaman    7 年前

    为了使用 vQmod (根据前面描述的过程),您可以查看 this method for working with real images 而不是缩略图。

    请注意,还有其他可能的建议,例如: