0

これは私のコードですが、在庫のある製品のみを取得します。売り切れ分も含めて全商品揃えたいです。何か考えはありますか?

 $productCount = 5;
        $storeId    = Mage::app()->getStore()->getId(); 


$productsBestSellerMens = Mage::getResourceModel('reports/product_collection')
            ->addOrderedQty()
            ->addAttributeToSelect('*')  
            ->setStoreId($storeId)
            ->addCategoryFilter($mensID)
            ->setPageSize($productCount);
4

2 に答える 2

0

You may want to try an extension that will show not only best selling products, but also new/sale/best-selling/most-viewed/top-rated/featured/sold-out products.

Source: http://www.magentocommerce.com/magento-connect/product-gallery.html

于 2013-10-06T21:38:15.260 に答える