Flat Catalog Product
オプションを有効にすると、商品レポートのコレクションから「名前、価格など」の商品属性を取得できません。このオプションを有効にすると、すべての属性がcatalog_product_flat
に保持されます。だから、私は、ほとんどの視聴された製品を表示する拡張機能を作りたいが、上記の問題のために成功していない。フラット製品の問題
私は多くの方法を試みたが、次のように何事もなかっ:
$collection = Mage::getResourceModel('reports/product_collection')
->addAttributeToSelect(*)
->setStoreId($store)
->addStoreFilter($store)
->addViewsCount();
$collection = Mage::getResourceModel('reports/product_collection')
->addAttributeToSelect(*)
->addAttributeToSelect(array('name', 'price')) // this will not work is because of the collection
->setStoreId($store)
->addStoreFilter($store)
->addViewsCount();
だから、あなたは上記のコレクションを得るために任意のアイデアを持っていますか?
左に必要な属性はメインコレクション –