未从畅销书中获取magento图像url
我在magento为畅销产品编写了一些代码,但是 我没有得到产品图片url 我需要画廊的小图片 我正在开发畅销书slider…整个产品都很好 但只是我没有得到图片的网址 我的代码未从畅销书中获取magento图像url,magento,Magento,我在magento为畅销产品编写了一些代码,但是 我没有得到产品图片url 我需要画廊的小图片 我正在开发畅销书slider…整个产品都很好 但只是我没有得到图片的网址 我的代码 $current_category = Mage::registry('current_category'); $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
$current_category = Mage::registry('current_category');
$is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
$collection = Mage::getResourceModel('reports/product_collection')
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
->addOrderedQty()
->addMinimalPrice()
->addTaxPercents()
->addStoreFilter();
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
if($current_category && $is_category_filter == '1'){
$current_category_id = Mage::registry('current_category')->getId();
$currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
$collection->addCategoryFilter($currentCategory);
}
$collection->setPageSize(30);
$this->setProductCollection($collection);
return $collection;
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(160, 225) ?>" width="160" height="225" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a>