Producer ID?

#
Producer ID?
Хочу вывести в шаблоне XSL МагазинТовар Ссылку вида "показать все товары данного производителя"

Вот код:

<a href="{/shop/path}{fullpath}?producer_id={?????}">Все товары этой марки</a>


Перепробывал миллион вариантов, перерыл форум. Перечитал документацию. Хоть убейте меня.

НЕ ВЫВОДИТСЯ!?

Я думаю что это элементарнее некуда, но все же.....
#
Re: Producer ID?
а так
<a href="{/shop/path}{fullpath}?producer_id={producer/@id}">Все товары этой марки</a>
не пробовали?
Заказов не беру. Консультирую редко.
#
Re: Producer ID?
Спасибо огромное!
#
Re: Producer ID?
да пожалуйста )
Впредь обращайте внимание на XML, генерируемый системой для вашего xsl-шаблона - там этот идентификатор сразу заметен )
Заказов не беру. Консультирую редко.
#
Re: Producer ID?
Дык я его видел. саму конструкцию не понимал. просто кода смотришь все параметры по producer без @ нет там айди - единственное похожее это Producer_43
#
Re: Producer ID?
Неправда ваша, есть там id
вот вам цитата из xml для товара "Ariston LI 705 Extra" из магазина на демо-сайте:
<?xml version="1.0" encoding="windows-1251"?>
<shop id="1" current_group_id="592">
   <user_id>0</user_id>
   <name>Демонстрационный магазин</name>
   <description></description>
   <path>/shop/</path>
   <site_id>1</site_id>
   <shop_image_small_max_width>100</shop_image_small_max_width>
   <shop_image_big_max_width>800</shop_image_big_max_width>
   <shop_image_small_max_height>100</shop_image_small_max_height>
   <shop_image_big_max_height>800</shop_image_big_max_height>
   <structure_id>42</structure_id>
   <shop_country_id>175</shop_country_id>
   <shop_currency id="1">
      <shop_currency_name>руб.</shop_currency_name>
      <shop_currency_international_name>RUR</shop_currency_international_name>
      <shop_currency_value_in_basic_currency>1.000000</shop_currency_value_in_basic_currency>
      <shop_currency_is_default>1</shop_currency_is_default>
   </shop_currency>
   <all_currency>
      <shop_currency id="1">
         <shop_currency_name>руб.</shop_currency_name>
         <shop_currency_international_name>RUR</shop_currency_international_name>
         <shop_currency_value_in_basic_currency>1.000000</shop_currency_value_in_basic_currency>
         <shop_currency_is_default>1</shop_currency_is_default>
         <shop_currency_coefficient>1</shop_currency_coefficient>
      </shop_currency>
      <shop_currency id="2">
         <shop_currency_name>&amp;euro;</shop_currency_name>
         <shop_currency_international_name>EUR</shop_currency_international_name>
         <shop_currency_value_in_basic_currency>36.889479</shop_currency_value_in_basic_currency>
         <shop_currency_is_default>0</shop_currency_is_default>
         <shop_currency_coefficient>0.0271080000886</shop_currency_coefficient>
      </shop_currency>
      <shop_currency id="3">
         <shop_currency_name>$</shop_currency_name>
         <shop_currency_international_name>USD</shop_currency_international_name>
         <shop_currency_value_in_basic_currency>23.639664</shop_currency_value_in_basic_currency>
         <shop_currency_is_default>0</shop_currency_is_default>
         <shop_currency_coefficient>0.0423017856768</shop_currency_coefficient>
      </shop_currency>
   </all_currency>
   <shop_order_status id="0">
   </shop_order_status>
   <shop_mesures id="29">
      <shop_mesures_name>г</shop_mesures_name>
      <shop_mesures_description>грамм</shop_mesures_description>
   </shop_mesures>
   <shop_shops_send_order_mail_admin>1</shop_shops_send_order_mail_admin>
   <shop_shops_send_order_mail_user>1</shop_shops_send_order_mail_user>
   <shop_shops_admin_mail>smolny@localhost.ru</shop_shops_admin_mail>
   <shop_list_of_prices>
      <shop_list_of_price id="1" name="Дилер (золотой)">
         <percent>65</percent>
      </shop_list_of_price>
      <shop_list_of_price id="2" name="Дилер (серебряный)">
         <percent>80</percent>
      </shop_list_of_price>
      <shop_list_of_price id="3" name="Дилер (яхонтовый)">
         <percent>95</percent>
      </shop_list_of_price>
   </shop_list_of_prices>
   <group id="592" parent="0">
      <name>Посудомоечные машины</name>
      <description></description>
      <order>60</order>
      <indexation>0</indexation>
      <path>posudomoichnye_mashiny</path>
      <fullpath>posudomoichnye_mashiny/</fullpath>
      <count_items>7</count_items>
      <count_groups>0</count_groups>
      <count_all_items>7</count_all_items>
      <count_all_groups>0</count_all_groups>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <propertys>
      </propertys>
   </group>
   <sallers>
      <saller id="1">
         <sallers_name>ООО &quot;Инфинити&quot;</sallers_name>
         <sallers_contact_person>Иванов И. А.</sallers_contact_person>
         <sallers_comment></sallers_comment>
         <sallers_address></sallers_address>
         <sallers_phone></sallers_phone>
         <sallers_fax></sallers_fax>
         <sallers_http></sallers_http>
         <sallers_email></sallers_email>
         <sallers_inn></sallers_inn>
      </saller>
   </sallers>
   <item id="108" group="592">
      <captcha_key>72647</captcha_key>
      <name>Ariston LI 705 Extra</name>
      <show_count>4</show_count>
      <saller>0</saller>
      <marking_of_goods></marking_of_goods>
      <description></description>
      <date>21.04.2008</date>
      <datetime>21.04.2008 05:49:21</datetime>
      <time>05:49:21</time>
      <putoff_date>21.04.2008 05:49:21</putoff_date>
      <putend_date>00.00.0000 00:00:00</putend_date>
      <text>Общие характеристики (тут я немного сократил)</text>
      <producer id="22">
         <name>Ariston</name>
         <description></description>
         <path>Producer_22</path>
         <shop_producers_list_name>Ariston</shop_producers_list_name>
         <shop_producers_list_description></shop_producers_list_description>
         <shop_producers_list_image></shop_producers_list_image>
         <shop_producers_list_path>Producer_22</shop_producers_list_path>
         <shop_producers_list_address></shop_producers_list_address>
         <shop_producers_list_fax></shop_producers_list_fax>
         <shop_producers_list_site></shop_producers_list_site>
         <shop_producers_list_email></shop_producers_list_email>
         <shop_producers_list_inn></shop_producers_list_inn>
         <shop_producers_list_kpp></shop_producers_list_kpp>
         <shop_producers_list_ogrn></shop_producers_list_ogrn>
         <shop_producers_list_okpo></shop_producers_list_okpo>
         <shop_producers_list_okved></shop_producers_list_okved>
         <shop_producers_list_bik></shop_producers_list_bik>
         <shop_producers_list_account></shop_producers_list_account>
         <shop_producers_list_corr_account></shop_producers_list_corr_account>
         <shop_producers_list_bank_address></shop_producers_list_bank_address>
         <shop_producers_list_seo_title></shop_producers_list_seo_title>
         <shop_producers_list_seo_description></shop_producers_list_seo_description>
         <shop_producers_list_seo_keywords></shop_producers_list_seo_keywords>
      </producer>
      <image width="302" height="326">/upload/shop_1/1/0/8/item_108/shop_items_catalog_image108.jpg</image>
      <small_image width="92" height="100">/upload/shop_1/1/0/8/item_108/small_shop_items_catalog_image108.jpg</small_image>
      <type>0</type>
      <weight>0</weight>
      <weight_mesure>г</weight_mesure>
      <rest>0</rest>
      <mesure></mesure>
      <shop_tax_id>0</shop_tax_id>
      <price>17268.00</price>
      <price_tax>17268.00</price_tax>
      <price_discount>17268.00</price_discount>
      <item_currency>руб.</item_currency>
      <currency>руб.</currency>
      <is_active>1</is_active>
      <order>0</order>
      <path>ariston_li_705_extra</path>
      <fullpath>posudomoichnye_mashiny/</fullpath>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <indexation>1</indexation>
      <vendorCode></vendorCode>
      <shop_items_cml_id></shop_items_cml_id>
      <tags>
         <tag id="65">
            <tag_name>Ariston</tag_name>
            <tag_description></tag_description>
            <tag_path_name>Ariston</tag_path_name>
         </tag>
         <tag id="75">
            <tag_name>посудомоечная машина</tag_name>
            <tag_description></tag_description>
            <tag_path_name>%EF%EE%F1%F3%E4%EE%EC%EE%E5%F7%ED%E0%FF%20%EC%E0%F8%E8%ED%E0</tag_path_name>
         </tag>
      </tags>
      <shop_special_prices>
      </shop_special_prices>
   </item>
</shop>


А символом @ параметр id в xml и не должен быть отмечен. - Символ @ используется в xsl, для того чтобы указать, что после во фразе producer/@id мы обращаемся не к узлу-потомку узла producer, а к свойству узла producer!
Пример:

<узел свойство="значение_свойства">
   <подузел>значение</подузел>
</узел>

Для обращения к свойству нужно использовать <xsl:value-of select="@свойство" />
а для получения значения подузла - <xsl:value-of select="подузел" />
Заказов не беру. Консультирую редко.
#
Re: Producer ID?
Попробовал в hostcms v6, не работает. Как можно вывести в ней значение id?
Модератор
#
Re: Producer ID?
1. Ветка форума для 5ки. У 6ки есть отдельная ветка.

2. Опишите подробнее, где Вы пытаетесь выводить и как выводите.
Вы только что начали читать предложение, чтение которого вы уже заканчиваете.
Авторизация