Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何删除magento中产品图像的缓存url_Magento_Caching - Fatal编程技术网

如何删除magento中产品图像的缓存url

如何删除magento中产品图像的缓存url,magento,caching,Magento,Caching,对于我的所有magento产品图像,我从缓存url获取图像。如何禁用它并使我的产品图像使用原始url 我在我的/public_html/dirname/app/code/core/Mage/Catalog/Helper/image.php文件中尝试了以下代码,但它不支持 Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage()); 正是我需要使用代码的地方。或者建议一些解决方案

对于我的所有magento产品图像,我从缓存url获取图像。如何禁用它并使我的产品图像使用原始url

我在我的/public_html/dirname/app/code/core/Mage/Catalog/Helper/image.php文件中尝试了以下代码,但它不支持

Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage());

正是我需要使用代码的地方。或者建议一些解决方案来解决这个问题。

它对我有用。open list.phtml文件找到这个代码行编号。notepad++133

<img id="product-collection-image-<?php echo $_product->getId(); ?>"
                     src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(236,193); ?>"
                     alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
helper('catalog/image')->init($_product,'small_image')->调整大小(236193);?>"
alt=”“/>
使用此代码重新安装

<img width="236" height="193" id="product-collection-image-<?php echo $_product->getId(); ?>"
                     src="<?php echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $_product->getSmallImage()); ?>"
                     alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
getMediaUrl($\u product->getSmallImage());?>”
alt=”“/>

它仅适用于网格模式,您也可以更改列表模式,并且产品详细信息页面medai.pthml文件仅在此文件上更改src tag
src=“”

它对我的作用。open list.phtml文件找到此代码行号notepad++133

<img id="product-collection-image-<?php echo $_product->getId(); ?>"
                     src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(236,193); ?>"
                     alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
helper('catalog/image')->init($_product,'small_image')->调整大小(236193);?>"
alt=”“/>
使用此代码重新安装

<img width="236" height="193" id="product-collection-image-<?php echo $_product->getId(); ?>"
                     src="<?php echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $_product->getSmallImage()); ?>"
                     alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
getMediaUrl($\u product->getSmallImage());?>”
alt=”“/>
它仅适用于网格模式,您也可以更改为列表模式,产品详细信息页面medai.pthml文件仅在此文件上更改src tag
src=“”