Где редактируеться Спец предложения?

#
Re: Где редактируеться Спец предложения?
HostCMS,
Большое спасибо немного помогло, но вот не могу убрать никак слово "товаров" в xml его нету
Модератор
#
Re: Где редактируеться Спец предложения?
Показывайте XML, XSL. Не имея этих данных тяжело сказать где что поменять
#
Re: Где редактируеться Спец предложения?
XML

<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
   
   <xsl:template match="/cart">
      
      <div id="little_cart">
         
         <xsl:choose>
            <!-- Магазин не найден -->
            <xsl:when test="error_not_isset_shop/node()">
               <p>
                  <b>Ошибка! Магазин с указанным идентификатором не найден!</b>
                  <br/>Укажите правильный код магазина!</p>
            </xsl:when>
            <!-- Магазин найден -->
            <xsl:otherwise>
               
               <xsl:choose>
                  <!-- В корзине нет ни одного элемента -->
                  <xsl:when test="totalquantity = 0">
                     <h2>Корзина пуста</h2>
                     <xsl:choose>
                        <xsl:when test="site_users_class_exists = 1 and user_id = 0">
                           <p></p>
                        </xsl:when>
                        <xsl:otherwise></xsl:otherwise>
                     </xsl:choose>
                  </xsl:when>
                  <xsl:otherwise>
                     <h2>Мой заказ</h2>
                     
                     <!-- Вывод общих количества, веса и стоимости товаров -->
                     <p><xsl:call-template name="declension">
                           <xsl:with-param name="number" select="totalquantity"/></xsl:call-template>
                        <br/><xsl:value-of select="totalsum"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="shop/shop_currency/shop_currency_name"/></p>
                     
                     <xsl:if test="totalweight &gt; 0">
                        
                     </xsl:if>
                     
                     <p>
                        <a href="{/cart/shop/path}cart/">Перейти в корзину</a>
                     </p>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:otherwise>
         </xsl:choose>
      </div>
   </xsl:template>
   
   <!-- Склонение после числительных -->
   <xsl:template name="declension">
      
      <xsl:param name="number" select="number"/>
      
      <!-- Именительный падеж -->
      <xsl:variable name="nominative">
         <xsl:text>товар</xsl:text>
      </xsl:variable>
      
      <!-- Родительный падеж, единственное число -->
      <xsl:variable name="genitive_singular">
         <xsl:text>товара</xsl:text>
      </xsl:variable>
      
      
      <xsl:variable name="genitive_plural">
         <xsl:text>товаров</xsl:text>
      </xsl:variable>
      
      <xsl:variable name="last_digit">
         <xsl:value-of select="$number mod 10"/>
      </xsl:variable>
      
      <xsl:variable name="last_two_digits">
         <xsl:value-of select="$number mod 100"/>
      </xsl:variable>
      
      <xsl:choose>
         <xsl:when test="$last_digit = 1 and $last_two_digits != 11">
            <xsl:value-of select="$nominative"/>
         </xsl:when>
         <xsl:when test="$last_digit = 2 and $last_two_digits != 12     or     $last_digit = 3 and $last_two_digits != 13     or     $last_digit = 4 and $last_two_digits != 14">
            <xsl:value-of select="$genitive_singular"/>
         </xsl:when>
         <xsl:otherwise>
            <xsl:value-of select="$genitive_plural"/>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template>
</xsl:stylesheet>


XSL


<?xml version="1.0" encoding="windows-1251"?>
<cart>
<shop id="1">
<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.000000</shop_currency_is_default>
</shop_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>
</shop>
<user_id></user_id>
<site_users_class_exists>0</site_users_class_exists>
<itemincart id="0">
<item id="38" group="587">
<captcha_key>74112</captcha_key>
<name>42PFL7962D</name>
<show_count>0</show_count>
<saller>0</saller>
<marking_of_goods></marking_of_goods>
<description></description>
<date>21.04.2008</date>
<datetime>21.04.2008 11:34:37</datetime>
<time>11:34:37</time>
<putoff_date>21.04.2008 11:34:37</putoff_date>
<putend_date>00.00.0000 00:00:00</putend_date>
<text>&lt;table style=&quot;height: 445px;&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;5&quot; width=&quot;434&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Основные характеристики&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Тип&lt;/td&gt;
&lt;td&gt;ЖК-телевизор&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Диагональ&lt;/td&gt;
&lt;td&gt;42&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Формат экрана&lt;/td&gt;
&lt;td&gt;16:9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Разрешение&lt;/td&gt;
&lt;td&gt;1920x1080&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Поддержка HDTV&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Поддержка видеорежимов HDTV&lt;/td&gt;
&lt;td&gt;720p, 1080i, 1080p (Full HD)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Стереозвук&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Прием сигнала&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Поддержка стереозвука NICAM&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Поддержка телевизионных стандартов&lt;/td&gt;
&lt;td&gt;PAL, SECAM, NTSC, DVB-T&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Телетекст&lt;/td&gt;
&lt;td&gt;с памятью на 1200 стр.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Доступные разрешения при подключении к ПК&lt;/td&gt;
&lt;td&gt;640x480 &lt;br /&gt;800x600 &lt;br /&gt;1024x768 &lt;br /&gt;1280x1024 &lt;br /&gt;1360x768 &lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Функции&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Увеличение (Zoom)&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Таймер сна&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Защита от детей&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Экранное меню на русском&lt;/td&gt;
&lt;td&gt;есть&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</text>
<producer id="10">
<name>Philips</name>
<description></description>
<image></image>
<path>philips</path>
<shop_producers_list_name>Philips</shop_producers_list_name>
<shop_producers_list_description></shop_producers_list_description>
<shop_producers_list_image></shop_producers_list_image>
<shop_producers_list_path>philips</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>
</producer>
<image width="393" height="420">/upload/shop_1/item_catalog_38/shop_items_catalog_image38.jpg</image>
<small_image width="93" height="100">/upload/shop_1/item_catalog_38/small_shop_items_catalog_image38.jpg</small_image>
<weight>31000</weight>
<weight_mesure>г</weight_mesure>
<rest>0</rest>
<mesure></mesure>
<price>44082.00</price>
<price_tax>48980.00</price_tax>
<price_discount>44082.00</price_discount>
<discount>
<name>Первомайская скидка</name>
<value>10</value>
</discount>
<item_currency>руб.</item_currency>
<currency>руб.</currency>
<is_active>1</is_active>
<order>0</order>
<path>42pfl7962d</path>
<fullpath>plazmen_panel/</fullpath><seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexation>1</indexation>
<vendorCode></vendorCode>
<tags>
<tag id="49">
<tag_name>телевизор</tag_name>
<tag_path_name>%F2%E5%EB%E5%E2%E8%E7%EE%F0</tag_path_name>
</tag>
<tag id="50">
<tag_name>Philips</tag_name>
<tag_path_name>Philips</tag_path_name>
</tag>
</tags>
<shop_special_prices>
</shop_special_prices>
</item>
<flag_postpone>0</flag_postpone>
<quantity>2</quantity>
<price_all>88164.00</price_all>
</itemincart>
<itemincart id="0">
<item id="72" group="590">
<captcha_key>21827</captcha_key>
<name>Whirlpool ARC 4208 IX</name>
<show_count>0</show_count>
<saller>0</saller>
<marking_of_goods></marking_of_goods>
<description></description>
<date>21.04.2008</date>
<datetime>21.04.2008 04:39:04</datetime>
<time>04:39:04</time>
<putoff_date>21.04.2008 04:39:04</putoff_date>
<putend_date>00.00.0000 00:00:00</putend_date>
<text>&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;5&quot; width=&quot;100%&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Общие характеристики&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Тип&lt;/td&gt;
&lt;td&gt;холодильник с морозильником&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Расположение&lt;/td&gt;
&lt;td&gt;свободностоящий&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Управление&lt;/td&gt;
&lt;td&gt;электронное&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Класс энергопотребления&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Количество камер&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Количество дверей&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Расположение морозильной камеры&lt;/td&gt;
&lt;td&gt;сверху&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Габариты&lt;/td&gt;
&lt;td&gt;187.4x71x72.8 см&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Цвет&lt;/td&gt;
&lt;td&gt;нерж.сталь&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Объем&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Общий объем&lt;/td&gt;
&lt;td&gt;432 л&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Объем холодильной камеры&lt;/td&gt;
&lt;td&gt;325 л&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Объем морозильной камеры&lt;/td&gt;
&lt;td&gt;107 л&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</text>
<producer id="21">
<name>Whirlpool</name>
<description></description>
<image></image>
<path>Producer_21</path>
<shop_producers_list_name>Whirlpool</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_21</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>
</producer>
<image width="153" height="328">/upload/shop_1/item_catalog_72/shop_items_catalog_image72.jpg</image>
<small_image width="46" height="100">/upload/shop_1/item_catalog_72/small_shop_items_catalog_image72.jpg</small_image>
<weight>82000</weight>
<weight_mesure>г</weight_mesure>
<rest>0</rest>
<mesure></mesure>
<price>24165.90</price>
<price_tax>26851.00</price_tax>
<price_discount>24165.90</price_discount>
<discount>
<name>Первомайская скидка</name>
<value>10</value>
</discount>
<item_currency>руб.</item_currency>
<currency>руб.</currency>
<is_active>1</is_active>
<order>0</order>
<path>whirlpool_arc_4208_ix</path>
<fullpath>kholodilniki/</fullpath><seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<indexation>1</indexation>
<vendorCode></vendorCode>
<tags>
<tag id="67">
<tag_name>Whirlpool</tag_name>
<tag_path_name>Whirlpool</tag_path_name>
</tag>
<tag id="63">
<tag_name>холодильник</tag_name>
<tag_path_name>%F5%EE%EB%EE%E4%E8%EB%FC%ED%E8%EA</tag_path_name>
</tag>
</tags>
<shop_special_prices>
</shop_special_prices>
</item>
<flag_postpone>0</flag_postpone>
<quantity>5</quantity>
<price_all>120829.50</price_all>
</itemincart>
<totalquantity>7</totalquantity>
<totalweight>472000</totalweight>
<totalsum>208993.50</totalsum>
<total_sum_without_discount>208993.50</total_sum_without_discount>
<totalquantity_postpone_item>0</totalquantity_postpone_item>
<totalweight_postpone_item>0</totalweight_postpone_item>
<totalsum_postpone_item>0.00</totalsum_postpone_item>
<count_item>2</count_item>
<count_postpone_item>0</count_postpone_item>
</cart>
#
Re: Где редактируеться Спец предложения?
за это отвечает кусок

<xsl:call-template name="declension">
                           <xsl:with-param name="number" select="totalquantity"/></xsl:call-template>
                        <br/>
#
Re: Где редактируеться Спец предложения?
h4mpy,
Большое спасибо. помогло! как раз то что и нужно было
#
Re: Где редактируеться Спец предложения?
HostCMS писал(а):
script88,
Спецпредложения — это показ магазина с фильтром по наличию скидки. Соответственно чтобы товар попал в спецпредложение, к нму должна быть применена скидка.

А подскажите как сделать фильтр по наличию/отсутствию конкретного дополнительного свойства?
Модератор
#
Re: Где редактируеться Спец предложения?
medved-ltd,
По значению? См. API системы, есть готовые примеры фильтрации по доп. св-ву
Авторизация