Винни писал(а):
а как быть если нужно вывести из нескольких групп...через зарятую не работает ->group(123, 456)
Вот пример кода, пользуйтесь:
if (Core::moduleIsActive('shop'))
{
$Shop_Controller_Show = new Shop_Controller_Show(
Core_Entity::factory('Shop', 3)
);
$Shop_Controller_Show
->xsl(
Core_Entity::factory('Xsl')->getByName('МагазинКаталогТоваровНаГлавнойСпецПредСайт2')
)
->groupsMode('none')
->group(FALSE)
->cache(FALSE)
->limit(6);
$Shop_Controller_Show
->shopItems()
->queryBuilder()
->join('shop_groups', 'shop_groups.id', '=', 'shop_items.shop_group_id')
->where('shop_groups.deleted', '=', 0)
->where('shop_groups.active', '=', 1)
->where('shop_items.deleted', '=', 0)
->where('shop_items.active', '=', 1)
->where('shop_items.modification_id', '=', 0)
->where('shop_groups.id', 'IN', array(599, 598)) // <- Тут через запятую ID группы
->clearOrderBy()
->orderBy('RAND()');
$Shop_Controller_Show->show();
}