Starche, примерно так:
В начало кода _настроек_ ТДС ИМ добавить создание нового класса-потомка от стандартного контроллера, и в нем переопределить метод _groupCondition()
<?php
// kotoff - пример переопределения _groupCondition:
class My_Shop_Controller_Show extends Shop_Controller_Show
{
protected function _groupCondition()
{
if ($this->group)
{
$this
->_Shop_Items
->queryBuilder()
->join('shop_groups',
'shop_groups.id', '=', 'shop_items.shop_group_id',
array(
array('AND' => array('(')),
array('' => array('shop_groups.parent_id', '=', $this->group)),
array('OR' => array('shop_groups.id', '=', $this->group)),
array('' => array(')'))
)
);
} else
{
$this
->_Shop_Items
->queryBuilder()
->where('shop_items.shop_group_id', '=', 0);
}
return $this;
}
}
// конец примера переопределения _groupCondition
А чуть дальше заменить класс в создании экземпляра объекта:
$oShop = Core_Entity::factory('Shop', Core_Array::get(Core_Page::instance()->libParams, 'shopId'));
$Shop_Controller_Show = new Shop_Controller_Show($oShop);
$Shop_Controller_Show = new My_Shop_Controller_Show($oShop);
$Shop_Controller_Show
->limit($oShop->items_on_page)
->parseUrl();
// дальше обычный код ТДС