Вывод конкретных подгрупп на главной
помогите разобраться.
в шаблоне вставляю:
<?php
if (class_exists('shop'))
{
$shop = & singleton('shop');
// Идентификатор магазина
$shop_id = 1;
$param = array();
$param['xml_show_group_type'] = 'all';
$element['type'] = 0;
$element['prefix'] = ' and ';
$element['name'] = 'shop_groups_id';
$element['if'] = '=';
$element['value'] = '586';
$element['sufix'] = '';
$param['select_groups'][] = $element;
$shop->ShowShop($shop_id, 'МагазинКаталогНаГлавной', $param);
}
?>
586 - это подгруппа от группы с id 596.
Данная конструкция не работает - в xml никакой информации по данной группе не передается(требуется всего лишь вытащить картинку и описание группы).
В sql-запросах генерируется запрос:
В phpmyadmin его вставляю, нужная мне запись показывается. Шайтанама!
Причем для категории с id=596(родительская категория) показывается вся необходимая информация группы, когда $element['value'] = '596'.
Уже и не знаю куда думать.
в шаблоне вставляю:
<?php
if (class_exists('shop'))
{
$shop = & singleton('shop');
// Идентификатор магазина
$shop_id = 1;
$param = array();
$param['xml_show_group_type'] = 'all';
$element['type'] = 0;
$element['prefix'] = ' and ';
$element['name'] = 'shop_groups_id';
$element['if'] = '=';
$element['value'] = '586';
$element['sufix'] = '';
$param['select_groups'][] = $element;
$shop->ShowShop($shop_id, 'МагазинКаталогНаГлавной', $param);
}
?>
586 - это подгруппа от группы с id 596.
Данная конструкция не работает - в xml никакой информации по данной группе не передается(требуется всего лишь вытащить картинку и описание группы).
<?xml version="1.0" encoding="UTF-8"?>
<shop id="1" current_group_id="0">
<name>Каталог</name>
<description></description>
<path>/shop/</path>
<site_id>1</site_id>
<shop_image_small_max_width>125</shop_image_small_max_width>
<shop_image_big_max_width>800</shop_image_big_max_width>
<shop_image_small_max_height>145</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>RUB</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>RUB</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>&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>kronos2003@gmail.com</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>
<warehouses>
<warehouse id="3">
<shop_warehouse_name>Склад</shop_warehouse_name>
<shop_warehouse_activity>1</shop_warehouse_activity>
<shop_warehouse_address></shop_warehouse_address>
<shop_warehouse_order>0</shop_warehouse_order>
<shop_warehouse_default>1</shop_warehouse_default>
</warehouse>
</warehouses>
<sallers>
</sallers>
<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>100</items_on_page>
</shop>
<shop id="1" current_group_id="0">
<name>Каталог</name>
<description></description>
<path>/shop/</path>
<site_id>1</site_id>
<shop_image_small_max_width>125</shop_image_small_max_width>
<shop_image_big_max_width>800</shop_image_big_max_width>
<shop_image_small_max_height>145</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>RUB</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>RUB</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>&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>kronos2003@gmail.com</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>
<warehouses>
<warehouse id="3">
<shop_warehouse_name>Склад</shop_warehouse_name>
<shop_warehouse_activity>1</shop_warehouse_activity>
<shop_warehouse_address></shop_warehouse_address>
<shop_warehouse_order>0</shop_warehouse_order>
<shop_warehouse_default>1</shop_warehouse_default>
</warehouse>
</warehouses>
<sallers>
</sallers>
<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>100</items_on_page>
</shop>
В sql-запросах генерируется запрос:
SELECT * FROM `shop_groups_table` WHERE `shop_shops_id` = '1' AND `shop_groups_activity` = 1 and shop_groups_id= '586' ORDER BY shop_groups_order Asc, shop_groups_name Asc
.В phpmyadmin его вставляю, нужная мне запись показывается. Шайтанама!
Причем для категории с id=596(родительская категория) показывается вся необходимая информация группы, когда $element['value'] = '596'.
Уже и не знаю куда думать.
Боюсь так сложно будет сориентироваться. Напишите запрос в поддержку со ссылкой на данную тему, посмотрим на месте.
Вы только что начали читать предложение, чтение которого вы уже заканчиваете.
Авторизация