llirik,
Все ровно что-то не так.
Вот код xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:hostcms="http://www.hostcms.ru/"
exclude-result-prefixes="hostcms">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
<!-- МагазинГруппыТоваровНаГлавной -->
<xsl:template match="/">
<aside class="sidebar nopadding">
<div class="title_block">Блюдо дня</div>
<div class="body_block">
<xsl:apply-templates select="shop_item"/>
</div>
</aside>
</xsl:template>
<!-- Шаблон для магазина -->
<!-- Шаблон для групп товара -->
<xsl:template match="shop_item">
<xsl:if test="property_value[tag_name='dish_of_day']/value">
<img src="{dir}{image_small}" class="img-responsive"/>
<p class="price col-md-6"><xsl:value-of select="price"/> руб.</p><p class="weight col-md-6">400 гр.</p>
<a href="{url}"><button class="shop_buy">В корзину</button></a>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
А вот в код вывода:
<?php
if (Core::moduleIsActive('shop'))
{
$Shop_Controller_Show = new Shop_Controller_Show(
Core_Entity::factory('Shop', 1)
);
$Shop_Controller_Show
->xsl(
Core_Entity::factory('Xsl')->getByName('БлюдоДня')
)
->groupsMode('tree')
//->itemsForbiddenTags(array('text'))
->group(0)
->limit(1)
->itemsProperties (TRUE)
;
$Shop_Controller_Show
->ShopItems()
->queryBuilder()
->leftJoin('shop_item_properties', 'shop_items.shop_id', '=', 'shop_item_properties.shop_id')
->leftJoin('property_value_ints', 'shop_items.id', '=', 'property_value_ints.entity_id',
array(
array('AND' => array('shop_item_properties.property_id', '=', Core_QueryBuilder::expression('`property_value_ints`.`property_id`')))
)
)
// Идентификатор дополнительного свойства
->where('shop_item_properties.property_id', '=', 61)
// Значение дополнительного свойства
->where('property_value_ints.value', '=', '1')
->groupBy('shop_items.id')
// Количество свойств, если 1, то можно не указывать
->having(Core_Querybuilder::expression('COUNT(DISTINCT `shop_item_properties`.`property_id`)'), '=', 1);
$Shop_Controller_Show->show();
}
?>
Но все ровно не выводит. Что не так, можете подсказать?