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
Php 自定义图像属性未显示在搜索列表上_Php_Magento_Magento 1.8 - Fatal编程技术网

Php 自定义图像属性未显示在搜索列表上

Php 自定义图像属性未显示在搜索列表上,php,magento,magento-1.8,Php,Magento,Magento 1.8,我有一个名为hover_image的自定义媒体图像属性,当客户将鼠标悬停在显示的产品图像上时,您可以理解这一点 这适用于目录列表,但当我搜索产品时,出现的列表不会显示我上传到hover_image的图像。它显示了我从系统>配置>目录中为悬停图像上传的占位符 这是我用来在list.phtml视图中显示悬停图像的代码 您是如何添加属性的。您是否在控制台中检查该事件是否在搜索结果页中更新了? <a href="<?php echo $_product->getProductUrl()

我有一个名为hover_image的自定义媒体图像属性,当客户将鼠标悬停在显示的产品图像上时,您可以理解这一点

这适用于目录列表,但当我搜索产品时,出现的列表不会显示我上传到hover_image的图像。它显示了我从系统>配置>目录中为悬停图像上传的占位符

这是我用来在list.phtml视图中显示悬停图像的代码


您是如何添加属性的。您是否在控制台中检查该事件是否在搜索结果页中更新了?
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600); ?>" width="300" height="400" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" onmouseover="this.src='<?php echo $this->helper('catalog/image')->init($_product, 'hover_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600) ?>';" onmouseout="this.src='<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600) ?>';" />
</a>