Вопрос по выводу новинок товара

#
Вопрос по выводу новинок товара
Создал группу товаров, создал два товара, сделал свойства для группы "новинки", прописал ID свойства для группы:
Но в итоге выводится пустота.
<?php
if (class_exists('shop'))
{
$shop = & singleton('shop');
$shop_id = 1;
$param = array();
// Товары выбираем из всех групп
$param['current_group_id'] = true;
// Выводим по 4 товара в блока
$param['items_on_page'] = 2;
// Используем случайный вывод товара
$param['items_order'] = 'rand';
// Получаем все скидки магазина
$param['property_id'] = 133;
$shop->ShowShop($shop_id, 'МагазинКаталогТоваровНаГлавнойСпецПред', $param);
}
?>
Модератор
#
Re: Вопрос по выводу новинок товара
Уже проходили в Вашей же теме: http://www.hostcms.ru/forums/17/3882/
#
Re: Вопрос по выводу новинок товара
HostCMS, Сделал как написали там все равно тоже самое происходит
<?php
if (class_exists('shop'))
{
$shop = & singleton('shop');
$shop_id = 1;
$param = array();
// Товары выбираем из всех групп
$param['current_group_id'] = false;
// Выводим по 4 товара в блока
$param['items_on_page'] = 2;
// Используем случайный вывод товара
$param['items_order'] = 'rand';

$element = array();
$element['type']=1;
$element['prefix'] = 'and';
$element['property_id'] = 133;
$element['if'] = '=';
$element['value'] = '1';
$element['sufix'] = '';
$param['select'][]=$element;

$shop->ShowShop($shop_id, 'МагазинКаталогТоваровНаГлавнойСпецПред', $param);
}
?>
#
Re: Вопрос по выводу новинок товара
посмотрите есть ли в xml данные
ку
#
Re: Вопрос по выводу новинок товара
compaq,

<?xml version="1.0" encoding="windows-1251"?>
<shop id="1" current_group_id="0">
   <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.027108000088589</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.042301785676818</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>
   <tags>
   </tags>
   <group id="594" parent="0">
      <name>Новинки</name>
      <description></description>
      <order>0</order>
      <indexation>1</indexation>
      <path>group_594</path>
      <fullpath>group_594/</fullpath>
      <count_items>2</count_items>
      <count_groups>0</count_groups>
      <count_all_items>2</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>
   <taxes>
      <tax id="2">
         <tax_name>НДС 18 (входит в цену)</tax_name>
         <tax_rate>18</tax_rate>
         <tax_is_in_price>1</tax_is_in_price>
      </tax>
      <tax id="5">
         <tax_name>НДС 18 (не входит в цену)</tax_name>
         <tax_rate>18</tax_rate>
         <tax_is_in_price>0</tax_is_in_price>
      </tax>
      <tax id="19">
         <tax_name>НДС 10 (входит в цену)</tax_name>
         <tax_rate>10</tax_rate>
         <tax_is_in_price>1</tax_is_in_price>
      </tax>
      <tax id="20">
         <tax_name>НДС 10 (не входит в цену)</tax_name>
         <tax_rate>10</tax_rate>
         <tax_is_in_price>0</tax_is_in_price>
      </tax>
      <tax id="21">
         <tax_name>НДС (без налога)</tax_name>
         <tax_rate>0</tax_rate>
         <tax_is_in_price>1</tax_is_in_price>
      </tax>
   </taxes>
   <count_items>0</count_items>
   <current_page>0</current_page>
   <items_on_page>3</items_on_page>
</shop>
#
Re: Вопрос по выводу новинок товара
посмотрите xml
/shop/group_594/?show_xml
есть ли у товаров св-во с ID = 133 и значением = 1

+ если есть группа новинки - можно просто выводить товары этой группы, без фильтров, доп. св-во подразумевает, что товар может находится в любой группе
#
Re: Вопрос по выводу новинок товара
h4mpy,
Если не трудно поясните пожалуйста я плохо понял Ваше сообщение
#
Re: Вопрос по выводу новинок товара
посмотрите xml
/shop/group_594/?show_xml
есть ли у товаров св-во с ID = 133 и значением = 1
наберите в браузере
http://адрес_вашего_сайта/shop/group_594/?show_xml
посмотрите xml для каталога товаров, найдите в нем узел item, проверьте есть ли внутри него узел property с ID равным 133, и значением value равным 1


+ если есть группа новинки — можно просто выводить товары этой группы, без фильтров, доп. св-во подразумевает, что товар может находится в любой группе
для чего вы используете доп. св-во "новинка", если все новинки у вас просто лежат в одной группе? просто выведите все товары этой группы
#
Re: Вопрос по выводу новинок товара
Большое спасибо я так и сделал.
Авторизация