2
我得到列表頁面上該對象上收集對象
$_productCollection=$this->getLoadedProductCollection();
//return 3 records
現在我應用過濾器
$_productCollection=$_productCollection->addFieldToFilter('genre', array('finset' => '126'));
//now it should return 1 record
,但它給我的3計數現在,如果我運行應用過濾器通過使用echo $_productCollection->getSelect();
獲取查詢來查詢數據庫,它返回1條記錄。
有人可以幫我解決這個問題嗎?
您能否根據我的問題解釋一下,因爲我無法將其嵌入到我的代碼中 – Curiologix
@Curiologix:將代碼嵌入代碼時面臨什麼問題? –