更新时间:2023-11-30 13:55:16
setRandomOrder
不适用于产品集合,仅适用于相关产品.您必须使用以下代码自己添加它:
setRandomOrder
does not work for collections of products, only for related products. You'll have to add it yourself with this code:
$collection->getSelect()->order(new Zend_Db_Expr('RAND()'));
同时设置页面大小和页码的快捷方式是:
A shortcut for setting both page size and number at the same time is:
$collection->setPage($pageNum, $pageSize);