В настройках типовой добавляете новый класс:
class My_Shop_Controller_Show extends Shop_Controller_Show
{
protected function _groupCondition()
{
/*$this->_Shop_Items
->queryBuilder()
->where('shop_items.shop_group_id', '=', intval($this->group));
*/
if ($this->group)
{
$this
->shopItems()
->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
->shopItems()
->queryBuilder()
->where('shop_items.shop_group_id', '=', 0);
}
return $this;
}
}
и используете его:
//$Shop_Controller_Show = new Shop_Controller_Show($oShop);
$Shop_Controller_Show = new My_Shop_Controller_Show($oShop);