2
私は製品コレクションをロードし、レビューIDを配列に呼び出してそのフィルタを適用することでフィルタリングしようとしていました。Magento - ページ区切り付きの製品コレクションをロードする
私は良いニュースがあることであるので、
<block type="catalog/product_list" name="sale" template="reviewsList/index.phtml">
ようlist.phtmlのカスタムコピーを通してそれを実行していることをList.phtmlの上部にある下のコードを同封しましたコレクションは読み込まれますが、改ページは中断されます。誰かが素晴らしいアイデアを持っているならば。
下記の完全なコード。
ご迷惑をおかけして申し訳ございません。
<?php
$reviewCollection = Mage::getModel('review/review')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId())->addRateVotes()->setDateOrder();
$reviewArray = array();
foreach ($reviewCollection->getItems() as $thisReview):
array_push($reviewArray, $thisReview->getEntityPkValue());
endforeach;
$_productCollection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('entity_id', array('in' => $reviewArray))->addAttributeToSelect('*')->setPageSize(5);
$_productCollection = $_productCollection->load();
//$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
?>