borisych,
// Метки
if (Core::moduleIsActive('tag'))
{
$oTagsXmlEntity = Core::factory('Core_Xml_Entity')->name('mytags');
$Shop_Controller_Show->addEntity($oTagsXmlEntity);
$aTags = Core_Entity::factory('Tag');
$aTags->queryBuilder()
->select(array('COUNT(tag_id)', 'count'), 'tags.*')
->join('tag_shop_items', 'tag_shop_items.tag_id', '=', 'tags.id')
->join('shop_items', 'tag_shop_items.shop_item_id', '=', 'shop_items.id')
->leftJoin('shop_groups', 'shop_items.shop_group_id', '=', 'shop_groups.id')
->where('shop_items.shop_id', '=', $oShop->id)
->where('shop_items.deleted', '=', 0)
->groupBy('tag_shop_items.tag_id')
->having('count', '>', 0)
->orderBy('tags.name', 'ASC');
$oTags = $aTags->findAll(FALSE);
foreach ($oTags as $oTag)
{
$oTagsXmlEntity->addEntity(
$oTag->clearEntities()
);
}
}
В контроллере магазина будет Тег
mytags думаю разберетесь.