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