Magento工具栏无法使用自定义排序代码

时间:2013-05-15 14:49:29

标签: magento magento-1.7

我尝试使用created_at和按名称分组对产品列表进行排序,这就是我添加

的原因
$this->_productCollection->addAttributeToSort('created_at', 'desc')
                ->getSelect()->group('name');;

return $this->_productCollection;

在函数_getProductCollection()

//应用程序/代码/本地/法师/目录/砌块/产品/ list.php的

排序工作正常,但分页和项目数量显示错误。

enter image description here 它看起来只有一个产品,但我在这里有很多产品,我没有在工具栏页面中更改任何内容。

1 个答案:

答案 0 :(得分:0)

以下网址将非常有用。

http://www.magentocommerce.com/boards/viewthread/51137/

签出功能

getSelectCountSql