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');
?>