Дополнительное свойство для группы товаров

#
Дополнительное свойство для группы товаров
Здравствуйте, подскажите как вывести доп свойство для группы товаров
В документации используется так <xsl:value-of select="property_value[tag_name='email']/value"/>
но на странице мне в xml они не прилетают,
Возможно нужно что-то добавить типо ->categoriesProperties(TRUE) но куда непонятно
как их можно добавить в xml?
#
Re: Дополнительное свойство для группы товаров
В ТДС магазина нужно указать groupsProperties(TRUE) тогда свойства групп пойдут в xml

https://www.hostcms.ru/api6/class-Shop_Controller_Show.html
«Не выходи из комнаты, не совершай ошибку…»
#
Re: Дополнительное свойство для группы товаров
Спасибо, помогло вывести в xml, но что-то снова не срастается такой код <xsl:value-of select="property_value[tag_name='seo_h1']/value"/> не работает
вот сам xml
<shop id="1">
   <shop_dir_id>0</shop_dir_id>
   <shop_company_id>1</shop_company_id>
   <site_id>3</site_id>
   <name>Каталог</name>
   <description></description>
   <yandex_market_name></yandex_market_name>
   <image_small_max_width>260</image_small_max_width>
   <image_small_max_height>260</image_small_max_height>
   <image_large_max_width>1000</image_large_max_width>
   <image_large_max_height>1000</image_large_max_height>
   <structure_id>169</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>0</shop_measure_id>
   <email>stroy@stroy-m32.ru</email>
   <items_on_page>16</items_on_page>
   <url_type>1</url_type>
   <reserve>1</reserve>
   <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>0</watermark_default_use_large_image>
   <watermark_default_use_small_image>0</watermark_default_use_small_image>
   <watermark_default_position_x>50%</watermark_default_position_x>
   <watermark_default_position_y>100%</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>0</write_off_paid_items>
   <apply_keywords_automatically>1</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>260</group_image_small_max_width>
   <group_image_large_max_width>800</group_image_large_max_width>
   <group_image_small_max_height>260</group_image_small_max_height>
   <group_image_large_max_height>800</group_image_large_max_height>
   <producer_image_small_max_width>100</producer_image_small_max_width>
   <producer_image_large_max_width>800</producer_image_large_max_width>
   <producer_image_small_max_height>100</producer_image_small_max_height>
   <producer_image_large_max_height>800</producer_image_large_max_height>
   <preserve_aspect_ratio>1</preserve_aspect_ratio>
   <preserve_aspect_ratio_small>1</preserve_aspect_ratio_small>
   <preserve_aspect_ratio_group>1</preserve_aspect_ratio_group>
   <preserve_aspect_ratio_group_small>1</preserve_aspect_ratio_group_small>
   <reserve_hours>24</reserve_hours>
   <adult>0</adult>
   <order_admin_subject>Заказ N %1$s от %3$s в &quot;%2$s&quot;</order_admin_subject>
   <order_user_subject>Заказ N %1$s от %3$s в &quot;%2$s&quot;</order_user_subject>
   <confirm_admin_subject>Подтверждение оплаты, заказ N %1$s от %3$s в магазине &quot;%2$s&quot;</confirm_admin_subject>
   <confirm_user_subject>Подтверждение оплаты, заказ N %1$s от %3$s</confirm_user_subject>
   <cancel_admin_subject>Отмена заказа N %1$s от %3$s в магазине &quot;%2$s&quot;</cancel_admin_subject>
   <cancel_user_subject>Отмена заказа N %1$s от %3$s</cancel_user_subject>
   <deleted>0</deleted>
   <http>//stroy-m32.ru</http>
   <url>/shop/</url>
   <captcha_id>38780</captcha_id>
   <siteuser_id>0</siteuser_id>
   <ТекущаяГруппа>2112</ТекущаяГруппа>
   <show_comments>1</show_comments>
   <show_add_comments>2</show_add_comments>
   <producers></producers>
   <group>2112</group>
   <page>0</page>
   <limit>16</limit>
   <total>75</total>
   <shop_group_properties>
      <property id="60">
         <property_dir_id>0</property_dir_id>
         <list_id>0</list_id>
         <informationsystem_id>0</informationsystem_id>
         <shop_id>0</shop_id>
         <name>Иконка для группы</name>
         <description></description>
         <type>2</type>
         <default_value></default_value>
         <tag_name>group_icon</tag_name>
         <sorting>0</sorting>
         <image_large_max_width>100</image_large_max_width>
         <image_large_max_height>70</image_large_max_height>
         <image_small_max_width>100</image_small_max_width>
         <image_small_max_height>70</image_small_max_height>
         <hide_small_image>1</hide_small_image>
         <guid>DDACDFCE-3222-8298-7FA2-896F37657E20</guid>
         <multiple>0</multiple>
         <user_id>19</user_id>
      </property>
      <property id="64">
         <property_dir_id>0</property_dir_id>
         <list_id>0</list_id>
         <informationsystem_id>0</informationsystem_id>
         <shop_id>0</shop_id>
         <name>Иконка для активной группы</name>
         <description></description>
         <type>2</type>
         <default_value></default_value>
         <tag_name>group_icon_active</tag_name>
         <sorting>0</sorting>
         <image_large_max_width>100</image_large_max_width>
         <image_large_max_height>70</image_large_max_height>
         <image_small_max_width>100</image_small_max_width>
         <image_small_max_height>70</image_small_max_height>
         <hide_small_image>1</hide_small_image>
         <guid>6D7FF40A-9387-FFCD-DD3B-E5ABF2BA3AEA</guid>
         <multiple>0</multiple>
         <user_id>19</user_id>
      </property>
      <property id="196">
         <property_dir_id>0</property_dir_id>
         <list_id>0</list_id>
         <informationsystem_id>0</informationsystem_id>
         <shop_id>0</shop_id>
         <name>Доп заголовок</name>
         <description></description>
         <type>1</type>
         <default_value></default_value>
         <tag_name>seo_h1</tag_name>
         <sorting>0</sorting>
         <guid>F4287823-3C20-5E11-3CFF-EE5CFE97F279</guid>
         <multiple>1</multiple>
         <user_id>22</user_id>
      </property>
   </shop_group_properties>
   <shop_group id="2112">
      <shop_id>1</shop_id>
      <siteuser_id>0</siteuser_id>
      <parent_id>0</parent_id>
      <name>Бензопилы и комплектующие</name>
      <description></description>
      <image_large>group_2112.jpg</image_large>
      <image_small>small_group_2112.jpg</image_small>
      <sorting>0</sorting>
      <indexing>1</indexing>
      <subgroups_count>16</subgroups_count>
      <subgroups_total_count>16</subgroups_total_count>
      <items_count>171</items_count>
      <items_total_count>169</items_total_count>
      <active>1</active>
      <siteuser_group_id>-1</siteuser_group_id>
      <path>benzopily-i-komplektuyushhie</path>
      <seo_title></seo_title>
      <seo_description>Бензопилы и комплектующие</seo_description>
      <seo_keywords></seo_keywords>
      <user_id>22</user_id>
      <image_large_width>280</image_large_width>
      <image_large_height>250</image_large_height>
      <image_small_width>260</image_small_width>
      <image_small_height>233</image_small_height>
      <guid>4C853698-2936-C184-2F0B-CE56397A6739</guid>
      <url>/shop/benzopily-i-komplektuyushhie/</url>
      <dir>/upload/shop_1/2/1/1/group_2112/</dir>
      <property_value id="175">
         <property_id>196</property_id>
         <entity_id>2112</entity_id>
         <value>Бензопилы и комплектующие в Брянске</value>
         <property_dir_id>0</property_dir_id>
         <tag_name>seo_h1</tag_name>
      </property_value>
      <shop_group id="2113">
         <shop_id>1</shop_id>
         <siteuser_id>0</siteuser_id>
         <parent_id>2112</parent_id>
         <name>Бензопилы</name>
         
Модератор
#
Re: Дополнительное свойство для группы товаров
jobtestuser,
внутри какого template вы его вызываете?
#
Re: Дополнительное свойство для группы товаров
В xsl шаблоне МагазинКаталогТоваровСайт3
#
Re: Дополнительное свойство для группы товаров
Под темплейтом имели ввиду не название xsl, а такую конструкцию https://www.hostcms.ru/documentation/step-by-step/xslt/xsl%3Atemplate-match/
«Не выходи из комнаты, не совершай ошибку…»
#
Re: Дополнительное свойство для группы товаров
<xsl:template match="/shop">
#
Re: Дополнительное свойство для группы товаров
Вы хотите вывести доп свойство текущей группы? Если да, то примерно так будет:
<xsl:variable name="group" select="group"/>
<xsl:value-of select="//shop_group[@id=$group]/property_value[tag_name='email']/value"/>
«Не выходи из комнаты, не совершай ошибку…»
#
Re: Дополнительное свойство для группы товаров
Спасибо, это то что было нужно
Авторизация