Сортировка товаров задаются через метод informationsystemItems()
контроллера Informationsystem_Controller_Show
, метод возвращает объект Informationsystem_Item_Model
с настроенными ограничениями. Для удаления предыдущих установок сортировки используется clearOrderBy()
$Informationsystem_Controller_Show
->informationsystemItems()
->queryBuilder()
->clearOrderBy()
->orderBy('informationsystem_items.name', 'ASC')
->orderBy('informationsystem_items.sorting', 'ASC');
$Informationsystem_Controller_Show->show();
$Informationsystem_Controller_Show
->informationsystemItems()
->queryBuilder()
->clearOrderBy()
->orderBy('RAND()');
$Informationsystem_Controller_Show->show();