Вывод подгрупп товаров в 6 версии
Здравствуйте.
Много перечитал существующих тем по выводу подгрупп, хотелось бы очертить решение для 6 версии.
Итак, если есть необходимость вывода не только основных групп но и подгрупп на главной странице магазина, тоесть здесь сайт.рф/shop/
Вот нашел шаблон в МагазинКаталогТоваров, который выводит список групп и картинки к ним.
Подскажите пожалуйста, как сделать чтобы под группой выводились подгруппы (если имеются).
Заранее спасибо.
Много перечитал существующих тем по выводу подгрупп, хотелось бы очертить решение для 6 версии.
Итак, если есть необходимость вывода не только основных групп но и подгрупп на главной странице магазина, тоесть здесь сайт.рф/shop/
Вот нашел шаблон в МагазинКаталогТоваров, который выводит список групп и картинки к ним.
<!-- Шаблон для групп товара -->
<xsl:template match="shop_group">
<ul>
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
<li>
<xsl:if test="image_small!=''">
<a href="{url}">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="shop_group">
<ul>
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
<li>
<xsl:if test="image_small!=''">
<a href="{url}">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
</li>
</xsl:for-each>
</ul>
</xsl:template>
Подскажите пожалуйста, как сделать чтобы под группой выводились подгруппы (если имеются).
Заранее спасибо.
перед </ul> добавить:
<xsl:apply-templates select="shop_group" mode="subgroup"/>
+ отдельно описать сам template с именем "subgroup".Если кого не затруднит, можете код написать? там же не много получится. тема думаю актуальна, и своим существованием поможет многим, дабы не задавать лишних вопросов.
создал шаблон
Не работает
Народ помогите пожалуйста
<xsl:template match="shop_group" mode="subgroup">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:template>
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:template>
Не работает
Народ помогите пожалуйста
seeker,
что не работает? Как не работает? Шаблон создали, а вызов его добавили? В XML подгруппы есть?
что не работает? Как не работает? Шаблон создали, а вызов его добавили? В XML подгруппы есть?
<!-- Шаблон для групп товара -->
<xsl:template match="shop_group">
<ul>
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
<li>
<!-- <xsl:if test="image_small!=''">
<a href="{url}" target="_blank">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if> -->
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
</li>
</xsl:for-each>
<xsl:apply-templates select="shop_group" mode="subgroup"/>
</ul>
</xsl:template>
<!-- Шаблон для подразделов -->
<xsl:template match="shop_group" mode="subgroup">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:template>
<xsl:template match="shop_group">
<ul>
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
<li>
<!-- <xsl:if test="image_small!=''">
<a href="{url}" target="_blank">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if> -->
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
</li>
</xsl:for-each>
<xsl:apply-templates select="shop_group" mode="subgroup"/>
</ul>
</xsl:template>
<!-- Шаблон для подразделов -->
<xsl:template match="shop_group" mode="subgroup">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:template>
И вот Xml - подгрупп я не вижу
<shop id="1">
<shop_dir_id>0</shop_dir_id>
<shop_company_id>1</shop_company_id>
<site_id>1</site_id>
<name>Демонстрационный магазин</name>
<description></description>
<yandex_market_name></yandex_market_name>
<image_small_max_width>100</image_small_max_width>
<image_small_max_height>100</image_small_max_height>
<image_large_max_width>800</image_large_max_width>
<image_large_max_height>800</image_large_max_height>
<structure_id>42</structure_id>
<shop_country_id>175</shop_country_id>
<shop_currency_id>1</shop_currency_id>
<shop_order_status_id>0</shop_order_status_id>
<shop_measure_id>29</shop_measure_id>
<email>admin@localhost.ru</email>
<items_on_page>6</items_on_page>
<url_type>1</url_type>
<send_order_email_admin>1</send_order_email_admin>
<send_order_email_user>1</send_order_email_user>
<items_sorting_field>2</items_sorting_field>
<items_sorting_direction>0</items_sorting_direction>
<groups_sorting_field>1</groups_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<user_id>19</user_id>
<comment_active>1</comment_active>
<watermark_file></watermark_file>
<watermark_default_use_large_image>1</watermark_default_use_large_image>
<watermark_default_use_small_image>1</watermark_default_use_small_image>
<watermark_default_position_x></watermark_default_position_x>
<watermark_default_position_y></watermark_default_position_y>
<guid></guid>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>1</apply_tags_automatically>
<write_off_paid_items>1</write_off_paid_items>
<apply_keywords_automatically>0</apply_keywords_automatically>
<change_filename>1</change_filename>
<attach_digital_items>1</attach_digital_items>
<yandex_market_sales_notes_default></yandex_market_sales_notes_default>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<group_image_small_max_width>100</group_image_small_max_width>
<group_image_large_max_width>800</group_image_large_max_width>
<group_image_small_max_height>100</group_image_small_max_height>
<group_image_large_max_height>800</group_image_large_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<url>/shop/</url>
<captcha_id>42535</captcha_id>
<items_count>2</items_count>
<items_total_count>65</items_total_count>
<subgroups_count>8</subgroups_count>
<subgroups_total_count>16</subgroups_total_count>
<siteuser_id>0</siteuser_id>
<ТекущаяГруппа>0</ТекущаяГруппа>
<show_comments>1</show_comments>
<show_add_comments>2</show_add_comments>
<producers></producers>
<group>0</group>
<page>0</page>
<limit>6</limit>
<total>2</total>
<shop_group id="586">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Видеокамеры</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>10</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>10</items_count>
<items_total_count>10</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>camcorder</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/camcorder/</url>
<dir>/upload/shop_1/5/8/6/group_586/</dir>
</shop_group>
<shop_group id="587">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Плазменные панели</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>20</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>10</items_count>
<items_total_count>10</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>plasma-panels</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/plasma-panels/</url>
<dir>/upload/shop_1/5/8/7/group_587/</dir>
</shop_group>
<shop_group id="588">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Цифровые фотоаппараты</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>30</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>digital-cameras</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/digital-cameras/</url>
<dir>/upload/shop_1/5/8/8/group_588/</dir>
</shop_group>
<shop_group id="590">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Холодильники</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>40</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>refrigerators</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/refrigerators/</url>
<dir>/upload/shop_1/5/9/0/group_590/</dir>
</shop_group>
<shop_group id="591">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Плиты</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>50</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>plates</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/plates/</url>
<dir>/upload/shop_1/5/9/1/group_591/</dir>
</shop_group>
<shop_group id="592">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Коляски</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>60</sorting>
<indexing>1</indexing>
<subgroups_count>7</subgroups_count>
<subgroups_total_count>8</subgroups_total_count>
<items_count>0</items_count>
<items_total_count>8</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>strollers</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/strollers/</url>
<dir>/upload/shop_1/5/9/2/group_592/</dir>
</shop_group>
<shop_group id="589">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>MP3-плееры</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>70</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>mp3-players</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/mp3-players/</url>
<dir>/upload/shop_1/5/8/9/group_589/</dir>
</shop_group>
<shop_group id="593">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Обогреватели</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>80</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>heaters</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/heaters/</url>
<dir>/upload/shop_1/5/9/3/group_593/</dir>
</shop_group>
<shop_item_properties></shop_item_properties>
<shop_item id="158">
<shortcut_id>0</shortcut_id>
<shop_tax_id>0</shop_tax_id>
<shop_seller_id>0</shop_seller_id>
<shop_group_id>0</shop_group_id>
<shop_currency_id>1</shop_currency_id>
<shop_id>1</shop_id>
<shop_producer_id>0</shop_producer_id>
<shop_measure_id>0</shop_measure_id>
<type>1</type>
<name>Карточка 200</name>
<marking></marking>
<vendorcode></vendorcode>
<description></description>
<image_large></image_large>
<image_small></image_small>
<weight>0.00</weight>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<sorting>0</sorting>
<path>card-200</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexing>1</indexing>
<image_small_height>100</image_small_height>
<image_small_width>100</image_small_width>
<image_large_height>800</image_large_height>
<image_large_width>800</image_large_width>
<yandex_market>1</yandex_market>
<yandex_market_bid>0</yandex_market_bid>
<yandex_market_cid>0</yandex_market_cid>
<manufacturer_warranty>0</manufacturer_warranty>
<country_of_origin></country_of_origin>
<yandex_market_sales_notes></yandex_market_sales_notes>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<modification_id>0</modification_id>
<guid></guid>
<showed>0</showed>
<deleted>0</deleted>
<url>/shop/card-200/</url>
<date>29.04.2008</date>
<datetime>29.04.2008 04:09:53</datetime>
<start_datetime>29.04.2008 04:09:53</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/shop_1/1/5/8/item_158/</dir>
<digitals>143</digitals>
<rest>999</rest>
<price>200.00</price>
<discount>0</discount>
<tax>0.00</tax>
<price_tax>200.00</price_tax>
<currency>руб.</currency>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
</shop_item>
<shop_item id="159">
<shortcut_id>0</shortcut_id>
<shop_tax_id>0</shop_tax_id>
<shop_seller_id>0</shop_seller_id>
<shop_group_id>0</shop_group_id>
<shop_currency_id>1</shop_currency_id>
<shop_id>1</shop_id>
<shop_producer_id>0</shop_producer_id>
<shop_measure_id>0</shop_measure_id>
<type>1</type>
<name>Карточка 500</name>
<marking></marking>
<vendorcode></vendorcode>
<description></description>
<image_large></image_large>
<image_small></image_small>
<weight>0.00</weight>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<sorting>0</sorting>
<path>card-500</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexing>1</indexing>
<image_small_height>100</image_small_height>
<image_small_width>100</image_small_width>
<image_large_height>800</image_large_height>
<image_large_width>800</image_large_width>
<yandex_market>1</yandex_market>
<yandex_market_bid>0</yandex_market_bid>
<yandex_market_cid>0</yandex_market_cid>
<manufacturer_warranty>0</manufacturer_warranty>
<country_of_origin></country_of_origin>
<yandex_market_sales_notes></yandex_market_sales_notes>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<modification_id>0</modification_id>
<guid></guid>
<showed>0</showed>
<deleted>0</deleted>
<url>/shop/card-500/</url>
<date>29.04.2008</date>
<datetime>29.04.2008 04:12:33</datetime>
<start_datetime>29.04.2008 04:12:33</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/shop_1/1/5/9/item_159/</dir>
<digitals>222</digitals>
<rest>999</rest>
<price>500.00</price>
<discount>0</discount>
<tax>0.00</tax>
<price_tax>500.00</price_tax>
<currency>руб.</currency>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
</shop_item>
<shop_currency id="1">
<name>руб.</name>
<code>RUB</code>
<exchange_rate>1.000000</exchange_rate>
<default>1</default>
<sorting>10</sorting>
<user_id>19</user_id>
</shop_currency>
<shop_measure id="29">
<name>г</name>
<description>грамм</description>
<user_id>19</user_id>
</shop_measure>
<shop_warehouse id="1">
<shop_id>1</shop_id>
<name>Основной</name>
<sorting>0</sorting>
<active>1</active>
<default>0</default>
<shop_country_id>0</shop_country_id>
<shop_country_location_id>0</shop_country_location_id>
<shop_country_location_city_id>0</shop_country_location_city_id>
<shop_country_location_city_area_id>0</shop_country_location_city_area_id>
<address></address>
<user_id>0</user_id>
</shop_warehouse>
</shop>
<shop_dir_id>0</shop_dir_id>
<shop_company_id>1</shop_company_id>
<site_id>1</site_id>
<name>Демонстрационный магазин</name>
<description></description>
<yandex_market_name></yandex_market_name>
<image_small_max_width>100</image_small_max_width>
<image_small_max_height>100</image_small_max_height>
<image_large_max_width>800</image_large_max_width>
<image_large_max_height>800</image_large_max_height>
<structure_id>42</structure_id>
<shop_country_id>175</shop_country_id>
<shop_currency_id>1</shop_currency_id>
<shop_order_status_id>0</shop_order_status_id>
<shop_measure_id>29</shop_measure_id>
<email>admin@localhost.ru</email>
<items_on_page>6</items_on_page>
<url_type>1</url_type>
<send_order_email_admin>1</send_order_email_admin>
<send_order_email_user>1</send_order_email_user>
<items_sorting_field>2</items_sorting_field>
<items_sorting_direction>0</items_sorting_direction>
<groups_sorting_field>1</groups_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<user_id>19</user_id>
<comment_active>1</comment_active>
<watermark_file></watermark_file>
<watermark_default_use_large_image>1</watermark_default_use_large_image>
<watermark_default_use_small_image>1</watermark_default_use_small_image>
<watermark_default_position_x></watermark_default_position_x>
<watermark_default_position_y></watermark_default_position_y>
<guid></guid>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>1</apply_tags_automatically>
<write_off_paid_items>1</write_off_paid_items>
<apply_keywords_automatically>0</apply_keywords_automatically>
<change_filename>1</change_filename>
<attach_digital_items>1</attach_digital_items>
<yandex_market_sales_notes_default></yandex_market_sales_notes_default>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<group_image_small_max_width>100</group_image_small_max_width>
<group_image_large_max_width>800</group_image_large_max_width>
<group_image_small_max_height>100</group_image_small_max_height>
<group_image_large_max_height>800</group_image_large_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<url>/shop/</url>
<captcha_id>42535</captcha_id>
<items_count>2</items_count>
<items_total_count>65</items_total_count>
<subgroups_count>8</subgroups_count>
<subgroups_total_count>16</subgroups_total_count>
<siteuser_id>0</siteuser_id>
<ТекущаяГруппа>0</ТекущаяГруппа>
<show_comments>1</show_comments>
<show_add_comments>2</show_add_comments>
<producers></producers>
<group>0</group>
<page>0</page>
<limit>6</limit>
<total>2</total>
<shop_group id="586">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Видеокамеры</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>10</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>10</items_count>
<items_total_count>10</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>camcorder</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/camcorder/</url>
<dir>/upload/shop_1/5/8/6/group_586/</dir>
</shop_group>
<shop_group id="587">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Плазменные панели</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>20</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>10</items_count>
<items_total_count>10</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>plasma-panels</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/plasma-panels/</url>
<dir>/upload/shop_1/5/8/7/group_587/</dir>
</shop_group>
<shop_group id="588">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Цифровые фотоаппараты</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>30</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>digital-cameras</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/digital-cameras/</url>
<dir>/upload/shop_1/5/8/8/group_588/</dir>
</shop_group>
<shop_group id="590">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Холодильники</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>40</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>refrigerators</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/refrigerators/</url>
<dir>/upload/shop_1/5/9/0/group_590/</dir>
</shop_group>
<shop_group id="591">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Плиты</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>50</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>plates</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/plates/</url>
<dir>/upload/shop_1/5/9/1/group_591/</dir>
</shop_group>
<shop_group id="592">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Коляски</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>60</sorting>
<indexing>1</indexing>
<subgroups_count>7</subgroups_count>
<subgroups_total_count>8</subgroups_total_count>
<items_count>0</items_count>
<items_total_count>8</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>strollers</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/strollers/</url>
<dir>/upload/shop_1/5/9/2/group_592/</dir>
</shop_group>
<shop_group id="589">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>MP3-плееры</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>70</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>mp3-players</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/mp3-players/</url>
<dir>/upload/shop_1/5/8/9/group_589/</dir>
</shop_group>
<shop_group id="593">
<shop_id>1</shop_id>
<parent_id>0</parent_id>
<name>Обогреватели</name>
<description></description>
<image_large></image_large>
<image_small></image_small>
<sorting>80</sorting>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>7</items_count>
<items_total_count>7</items_total_count>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<path>heaters</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<user_id>19</user_id>
<image_large_width>800</image_large_width>
<image_large_height>800</image_large_height>
<image_small_width>100</image_small_width>
<image_small_height>100</image_small_height>
<guid></guid>
<url>/shop/heaters/</url>
<dir>/upload/shop_1/5/9/3/group_593/</dir>
</shop_group>
<shop_item_properties></shop_item_properties>
<shop_item id="158">
<shortcut_id>0</shortcut_id>
<shop_tax_id>0</shop_tax_id>
<shop_seller_id>0</shop_seller_id>
<shop_group_id>0</shop_group_id>
<shop_currency_id>1</shop_currency_id>
<shop_id>1</shop_id>
<shop_producer_id>0</shop_producer_id>
<shop_measure_id>0</shop_measure_id>
<type>1</type>
<name>Карточка 200</name>
<marking></marking>
<vendorcode></vendorcode>
<description></description>
<image_large></image_large>
<image_small></image_small>
<weight>0.00</weight>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<sorting>0</sorting>
<path>card-200</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexing>1</indexing>
<image_small_height>100</image_small_height>
<image_small_width>100</image_small_width>
<image_large_height>800</image_large_height>
<image_large_width>800</image_large_width>
<yandex_market>1</yandex_market>
<yandex_market_bid>0</yandex_market_bid>
<yandex_market_cid>0</yandex_market_cid>
<manufacturer_warranty>0</manufacturer_warranty>
<country_of_origin></country_of_origin>
<yandex_market_sales_notes></yandex_market_sales_notes>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<modification_id>0</modification_id>
<guid></guid>
<showed>0</showed>
<deleted>0</deleted>
<url>/shop/card-200/</url>
<date>29.04.2008</date>
<datetime>29.04.2008 04:09:53</datetime>
<start_datetime>29.04.2008 04:09:53</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/shop_1/1/5/8/item_158/</dir>
<digitals>143</digitals>
<rest>999</rest>
<price>200.00</price>
<discount>0</discount>
<tax>0.00</tax>
<price_tax>200.00</price_tax>
<currency>руб.</currency>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
</shop_item>
<shop_item id="159">
<shortcut_id>0</shortcut_id>
<shop_tax_id>0</shop_tax_id>
<shop_seller_id>0</shop_seller_id>
<shop_group_id>0</shop_group_id>
<shop_currency_id>1</shop_currency_id>
<shop_id>1</shop_id>
<shop_producer_id>0</shop_producer_id>
<shop_measure_id>0</shop_measure_id>
<type>1</type>
<name>Карточка 500</name>
<marking></marking>
<vendorcode></vendorcode>
<description></description>
<image_large></image_large>
<image_small></image_small>
<weight>0.00</weight>
<active>1</active>
<siteuser_group_id>-1</siteuser_group_id>
<sorting>0</sorting>
<path>card-500</path>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexing>1</indexing>
<image_small_height>100</image_small_height>
<image_small_width>100</image_small_width>
<image_large_height>800</image_large_height>
<image_large_width>800</image_large_width>
<yandex_market>1</yandex_market>
<yandex_market_bid>0</yandex_market_bid>
<yandex_market_cid>0</yandex_market_cid>
<manufacturer_warranty>0</manufacturer_warranty>
<country_of_origin></country_of_origin>
<yandex_market_sales_notes></yandex_market_sales_notes>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<modification_id>0</modification_id>
<guid></guid>
<showed>0</showed>
<deleted>0</deleted>
<url>/shop/card-500/</url>
<date>29.04.2008</date>
<datetime>29.04.2008 04:12:33</datetime>
<start_datetime>29.04.2008 04:12:33</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/shop_1/1/5/9/item_159/</dir>
<digitals>222</digitals>
<rest>999</rest>
<price>500.00</price>
<discount>0</discount>
<tax>0.00</tax>
<price_tax>500.00</price_tax>
<currency>руб.</currency>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
</shop_item>
<shop_currency id="1">
<name>руб.</name>
<code>RUB</code>
<exchange_rate>1.000000</exchange_rate>
<default>1</default>
<sorting>10</sorting>
<user_id>19</user_id>
</shop_currency>
<shop_measure id="29">
<name>г</name>
<description>грамм</description>
<user_id>19</user_id>
</shop_measure>
<shop_warehouse id="1">
<shop_id>1</shop_id>
<name>Основной</name>
<sorting>0</sorting>
<active>1</active>
<default>0</default>
<shop_country_id>0</shop_country_id>
<shop_country_location_id>0</shop_country_location_id>
<shop_country_location_city_id>0</shop_country_location_city_id>
<shop_country_location_city_area_id>0</shop_country_location_city_area_id>
<address></address>
<user_id>0</user_id>
</shop_warehouse>
</shop>
и вот ещё настройки тдс магазина
<?php
$oShop = Core_Entity::factory('Shop', Core_Array::get(Core_Page::instance()->libParams, 'shopId'));
class My_Shop_Controller_Show extends Shop_Controller_Show
{
protected function _groupCondition()
{
$oShop = $this->getEntity();
if ($this->group)
{
// если ID группы не 0, т.е. не корневая группа
// получаем подгруппы
$aSubGroupsID = $this->fillShopGroup($oShop->id, $this->group); // добавляем текущую группу в массив
$aSubGroupsID[] = $this->group;
$this->shopItems()
->queryBuilder()
->where('shop_items.shop_group_id', 'IN', $aSubGroupsID); // получаем все товары из подгрупп
}
else
{
$this->shopItems()
->queryBuilder()
->where('shop_items.shop_group_id', '=', 0);
}
return $this;
}
protected $_aGroupTree = array();
public function fillShopGroup($iShopId, $iShopGroupParentId = 0, $iLevel = 0)
{
$iShopId = intval($iShopId);
$iShopGroupParentId = intval($iShopGroupParentId);
$iLevel = intval($iLevel);
if ($iLevel == 0)
{
$aTmp = Core_QueryBuilder::select('id', 'parent_id')
->from('shop_groups')
->where('shop_id', '=', $iShopId)
->where('deleted', '=', 0)
->execute()->asAssoc()->result();
foreach ($aTmp as $aGroup)
{
$this->_aGroupTree[$aGroup['parent_id']][] = $aGroup;
}
}
$aReturn = array();
if (isset($this->_aGroupTree[$iShopGroupParentId]))
{
foreach ($this->_aGroupTree[$iShopGroupParentId] as $childrenGroup)
{
$aReturn[] = $childrenGroup['id'];
$aReturn = array_merge($aReturn, $this->fillShopGroup($iShopId, $childrenGroup['id'], $iLevel + 1));
}
}
$iLevel == 0 && $this->_aGroupTree = array();
return $aReturn;
}
}
$Shop_Controller_Show = new My_Shop_Controller_Show($oShop);
$Shop_Controller_Show
->limit($oShop->items_on_page)
->parseUrl();
// Обработка скачивания файла электронного товара
$guid = Core_Array::getGet('download_file');
if (strlen($guid))
{
$oShop_Order_Item_Digital = Core_Entity::factory('Shop_Order_Item_Digital')->getByGuid($guid);
if (!is_null($oShop_Order_Item_Digital) && $oShop_Order_Item_Digital->Shop_Order_Item->Shop_Order->shop_id == $oShop->id)
{
$iDay = 7;
// Проверяем, доступна ли ссылка (Ссылка доступна в течение суток после оплаты)
if (Core_Date::sql2timestamp($oShop_Order_Item_Digital->Shop_Order_Item->Shop_Order->payment_datetime) > time() - 24 * 60 * 60 * $iDay)
{
$oShop_Item_Digital = $oShop_Order_Item_Digital->Shop_Item_Digital;
if ($oShop_Item_Digital->filename != '')
{
Core_File::download($oShop_Item_Digital->getFullFilePath(), $oShop_Item_Digital->filename);
exit();
}
}
else
{
Core_Message::show(Core::_('Shop_Order_Item_Digital.time_is_up', $iDay));
}
}
Core_Page::instance()->response->status(404)->sendHeaders()->showBody();
exit();
}
// Сравнение товаров
if (Core_Array::getRequest('compare'))
{
$shop_item_id = intval(Core_Array::getRequest('compare'));
if (Core_Entity::factory('Shop_Item', $shop_item_id)->shop_id == $oShop->id)
{
Core_Session::start();
if (isset($_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id]))
{
unset($_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id]);
}
else
{
$_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id] = 1;
}
}
exit();
}
// Избранное
if (Core_Array::getRequest('favorite'))
{
$shop_item_id = intval(Core_Array::getRequest('favorite'));
if (Core_Entity::factory('Shop_Item', $shop_item_id)->shop_id == $oShop->id)
{
Core_Session::start();
if (isset($_SESSION['hostcmsFavorite'][$oShop->id]) && in_array($shop_item_id, $_SESSION['hostcmsFavorite'][$oShop->id]))
{
unset($_SESSION['hostcmsFavorite'][$oShop->id][
array_search($shop_item_id, $_SESSION['hostcmsFavorite'][$oShop->id])
]);
}
else
{
$_SESSION['hostcmsFavorite'][$oShop->id][] = $shop_item_id;
}
}
exit();
}
// Текстовая информация для указания номера страницы, например "страница"
$pageName = Core_Array::get(Core_Page::instance()->libParams, 'page')
? Core_Array::get(Core_Page::instance()->libParams, 'page')
: 'страница';
// Разделитель в заголовке страницы
$pageSeparator = Core_Array::get(Core_Page::instance()->libParams, 'separator')
? Core_Page::instance()->libParams['separator']
: ' / ';
$aTitle = array($oShop->name);
$aDescription = array($oShop->name);
$aKeywords = array($oShop->name);
if (!is_null($Shop_Controller_Show->tag) && Core::moduleIsActive('tag'))
{
$oTag = Core_Entity::factory('Tag')->getByPath($Shop_Controller_Show->tag);
if ($oTag)
{
$aTitle[] = Core::_('Shop.tag', $oTag->name);
$aDescription[] = Core::_('Shop.tag', $oTag->name);
$aKeywords[] = Core::_('Shop.tag', $oTag->name);
}
}
if ($Shop_Controller_Show->group)
{
$oShop_Group = Core_Entity::factory('Shop_Group', $Shop_Controller_Show->group);
do {
$aTitle[] = $oShop_Group->seo_title != ''
? $oShop_Group->seo_title
: $oShop_Group->name;
$aDescription[] = $oShop_Group->seo_description != ''
? $oShop_Group->seo_description
: $oShop_Group->name;
$aKeywords[] = $oShop_Group->seo_keywords != ''
? $oShop_Group->seo_keywords
: $oShop_Group->name;
} while($oShop_Group = $oShop_Group->getParent());
}
if ($Shop_Controller_Show->item)
{
$oShop_Item = Core_Entity::factory('Shop_Item', $Shop_Controller_Show->item);
$aTitle[] = $oShop_Item->seo_title != ''
? $oShop_Item->seo_title
: $oShop_Item->name;
$aDescription[] = $oShop_Item->seo_description != ''
? $oShop_Item->seo_description
: $oShop_Item->name;
$aKeywords[] = $oShop_Item->seo_keywords != ''
? $oShop_Item->seo_keywords
: $oShop_Item->name;
}
if ($Shop_Controller_Show->producer)
{
$oShop_Producer = Core_Entity::factory('Shop_Producer', $Shop_Controller_Show->producer);
$aKeywords[] = $aDescription[] = $aTitle[] = $oShop_Producer->name;
}
if ($Shop_Controller_Show->page)
{
array_unshift($aTitle, $pageName . ' ' . ($Shop_Controller_Show->page + 1));
}
if (count($aTitle) > 1)
{
$aTitle = array_reverse($aTitle);
$aDescription = array_reverse($aDescription);
$aKeywords = array_reverse($aKeywords);
Core_Page::instance()->title(implode($pageSeparator, $aTitle));
Core_Page::instance()->description(implode($pageSeparator, $aDescription));
Core_Page::instance()->keywords(implode($pageSeparator, $aKeywords));
}
Core_Page::instance()->object = $Shop_Controller_Show;
$oShop = Core_Entity::factory('Shop', Core_Array::get(Core_Page::instance()->libParams, 'shopId'));
class My_Shop_Controller_Show extends Shop_Controller_Show
{
protected function _groupCondition()
{
$oShop = $this->getEntity();
if ($this->group)
{
// если ID группы не 0, т.е. не корневая группа
// получаем подгруппы
$aSubGroupsID = $this->fillShopGroup($oShop->id, $this->group); // добавляем текущую группу в массив
$aSubGroupsID[] = $this->group;
$this->shopItems()
->queryBuilder()
->where('shop_items.shop_group_id', 'IN', $aSubGroupsID); // получаем все товары из подгрупп
}
else
{
$this->shopItems()
->queryBuilder()
->where('shop_items.shop_group_id', '=', 0);
}
return $this;
}
protected $_aGroupTree = array();
public function fillShopGroup($iShopId, $iShopGroupParentId = 0, $iLevel = 0)
{
$iShopId = intval($iShopId);
$iShopGroupParentId = intval($iShopGroupParentId);
$iLevel = intval($iLevel);
if ($iLevel == 0)
{
$aTmp = Core_QueryBuilder::select('id', 'parent_id')
->from('shop_groups')
->where('shop_id', '=', $iShopId)
->where('deleted', '=', 0)
->execute()->asAssoc()->result();
foreach ($aTmp as $aGroup)
{
$this->_aGroupTree[$aGroup['parent_id']][] = $aGroup;
}
}
$aReturn = array();
if (isset($this->_aGroupTree[$iShopGroupParentId]))
{
foreach ($this->_aGroupTree[$iShopGroupParentId] as $childrenGroup)
{
$aReturn[] = $childrenGroup['id'];
$aReturn = array_merge($aReturn, $this->fillShopGroup($iShopId, $childrenGroup['id'], $iLevel + 1));
}
}
$iLevel == 0 && $this->_aGroupTree = array();
return $aReturn;
}
}
$Shop_Controller_Show = new My_Shop_Controller_Show($oShop);
$Shop_Controller_Show
->limit($oShop->items_on_page)
->parseUrl();
// Обработка скачивания файла электронного товара
$guid = Core_Array::getGet('download_file');
if (strlen($guid))
{
$oShop_Order_Item_Digital = Core_Entity::factory('Shop_Order_Item_Digital')->getByGuid($guid);
if (!is_null($oShop_Order_Item_Digital) && $oShop_Order_Item_Digital->Shop_Order_Item->Shop_Order->shop_id == $oShop->id)
{
$iDay = 7;
// Проверяем, доступна ли ссылка (Ссылка доступна в течение суток после оплаты)
if (Core_Date::sql2timestamp($oShop_Order_Item_Digital->Shop_Order_Item->Shop_Order->payment_datetime) > time() - 24 * 60 * 60 * $iDay)
{
$oShop_Item_Digital = $oShop_Order_Item_Digital->Shop_Item_Digital;
if ($oShop_Item_Digital->filename != '')
{
Core_File::download($oShop_Item_Digital->getFullFilePath(), $oShop_Item_Digital->filename);
exit();
}
}
else
{
Core_Message::show(Core::_('Shop_Order_Item_Digital.time_is_up', $iDay));
}
}
Core_Page::instance()->response->status(404)->sendHeaders()->showBody();
exit();
}
// Сравнение товаров
if (Core_Array::getRequest('compare'))
{
$shop_item_id = intval(Core_Array::getRequest('compare'));
if (Core_Entity::factory('Shop_Item', $shop_item_id)->shop_id == $oShop->id)
{
Core_Session::start();
if (isset($_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id]))
{
unset($_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id]);
}
else
{
$_SESSION['hostcmsCompare'][$oShop->id][$shop_item_id] = 1;
}
}
exit();
}
// Избранное
if (Core_Array::getRequest('favorite'))
{
$shop_item_id = intval(Core_Array::getRequest('favorite'));
if (Core_Entity::factory('Shop_Item', $shop_item_id)->shop_id == $oShop->id)
{
Core_Session::start();
if (isset($_SESSION['hostcmsFavorite'][$oShop->id]) && in_array($shop_item_id, $_SESSION['hostcmsFavorite'][$oShop->id]))
{
unset($_SESSION['hostcmsFavorite'][$oShop->id][
array_search($shop_item_id, $_SESSION['hostcmsFavorite'][$oShop->id])
]);
}
else
{
$_SESSION['hostcmsFavorite'][$oShop->id][] = $shop_item_id;
}
}
exit();
}
// Текстовая информация для указания номера страницы, например "страница"
$pageName = Core_Array::get(Core_Page::instance()->libParams, 'page')
? Core_Array::get(Core_Page::instance()->libParams, 'page')
: 'страница';
// Разделитель в заголовке страницы
$pageSeparator = Core_Array::get(Core_Page::instance()->libParams, 'separator')
? Core_Page::instance()->libParams['separator']
: ' / ';
$aTitle = array($oShop->name);
$aDescription = array($oShop->name);
$aKeywords = array($oShop->name);
if (!is_null($Shop_Controller_Show->tag) && Core::moduleIsActive('tag'))
{
$oTag = Core_Entity::factory('Tag')->getByPath($Shop_Controller_Show->tag);
if ($oTag)
{
$aTitle[] = Core::_('Shop.tag', $oTag->name);
$aDescription[] = Core::_('Shop.tag', $oTag->name);
$aKeywords[] = Core::_('Shop.tag', $oTag->name);
}
}
if ($Shop_Controller_Show->group)
{
$oShop_Group = Core_Entity::factory('Shop_Group', $Shop_Controller_Show->group);
do {
$aTitle[] = $oShop_Group->seo_title != ''
? $oShop_Group->seo_title
: $oShop_Group->name;
$aDescription[] = $oShop_Group->seo_description != ''
? $oShop_Group->seo_description
: $oShop_Group->name;
$aKeywords[] = $oShop_Group->seo_keywords != ''
? $oShop_Group->seo_keywords
: $oShop_Group->name;
} while($oShop_Group = $oShop_Group->getParent());
}
if ($Shop_Controller_Show->item)
{
$oShop_Item = Core_Entity::factory('Shop_Item', $Shop_Controller_Show->item);
$aTitle[] = $oShop_Item->seo_title != ''
? $oShop_Item->seo_title
: $oShop_Item->name;
$aDescription[] = $oShop_Item->seo_description != ''
? $oShop_Item->seo_description
: $oShop_Item->name;
$aKeywords[] = $oShop_Item->seo_keywords != ''
? $oShop_Item->seo_keywords
: $oShop_Item->name;
}
if ($Shop_Controller_Show->producer)
{
$oShop_Producer = Core_Entity::factory('Shop_Producer', $Shop_Controller_Show->producer);
$aKeywords[] = $aDescription[] = $aTitle[] = $oShop_Producer->name;
}
if ($Shop_Controller_Show->page)
{
array_unshift($aTitle, $pageName . ' ' . ($Shop_Controller_Show->page + 1));
}
if (count($aTitle) > 1)
{
$aTitle = array_reverse($aTitle);
$aDescription = array_reverse($aDescription);
$aKeywords = array_reverse($aKeywords);
Core_Page::instance()->title(implode($pageSeparator, $aTitle));
Core_Page::instance()->description(implode($pageSeparator, $aDescription));
Core_Page::instance()->keywords(implode($pageSeparator, $aKeywords));
}
Core_Page::instance()->object = $Shop_Controller_Show;
seeker писал(а):
в тдс в
добавить
И вот Xml - подгрупп я не вижу
в тдс в
$Shop_Controller_Show
добавить
->groupsMode('all')
Qualis писал(а):
seeker писал(а):
И вот Xml - подгрупп я не вижу
в тдс в
$Shop_Controller_Show
добавить
->groupsMode('all'
->groupsMode('all'
помогло
И вот Xml - подгрупп я не вижу
в тдс в
$Shop_Controller_Show
добавить
->groupsMode('all'
->groupsMode('all'
помогло
Авторизация