Задать вопрос
  • Как в 1С привязать товары к нескольким разделам?

    strify_25:
    Повторюсь, что в 1С именно так не сделать.
    Все делаем на стороне сайта Битрикс.
  • Как в 1С привязать товары к нескольким разделам?

    strify_25: Далее просто на сайте добавляете товар в нужные категории через меню "Раздел". Всё!
  • Как в 1С привязать товары к нескольким разделам?

    strify_25:

    В 1С делать ничего не нужно. Вы просто используете ту структуру каталога которую создаете в модуле выгрузки.

    Для этого просто добавьте в файл init.php который лежит в папке от корня /bitrix/php_interface

    следующий код:

    AddEventHandler("iblock", "OnBeforeIBlockElementUpdate","SaveMySection");
    function SaveMySection(&$arFields)
    {
    if (@$_REQUEST['mode']=='import')//импорт из 1с?
    {
    $db_old_groups = CIBlockElement::GetElementGroups($arFields['ID'], true);
    while($ar_group = $db_old_groups->Fetch())
    {
    if(!in_array($ar_group['ID'],$arFields['IBLOCK_SECTION']))
    $arFields['IBLOCK_SECTION'][]=$ar_group['ID'];
    }
    }
    }
  • Есть ли в БД Битрикс ссылки на фото товаров?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Хммм, можете поподробнее. Как реализовать?? У меня десктопное приложение на Delphi
  • Где посмотреть список товаров которые заказал клиент в таблицах БД Битрикс?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Алексей Бурлака: А если требуется постоянная загрузка и выгрузка информации из БД и в БД?
  • Где посмотреть список товаров которые заказал клиент в таблицах БД Битрикс?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Сбор информации требуется для удаленного приложения на ПК
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Работает для одного элемента массива, рабочее решение для множества вложенных массивов выше
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Никита Полевой: Да, спасибо большое. Невнимательность..
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Никита Полевой: Вот так будет?

    window.ad_products = [
    <?php echo
    $arLength = count( $arResult[ITEMS][AnDelCanBuy] );
    for( $i = 0 ; $i < $arLength ; $i++ ) {
    echo "{ id: " . $arResult['ITEMS']['AnDelCanBuy']['$i']['PRODUCT_ID'] . ", number: " . $arResult['ITEMS']['AnDelCanBuy']['$i']['QUANTITY'] . " }" . ( $i === $arLength - 1 ? "" : ", " );
    }
    ?>
    ];

    Не могу понять почему не работает
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Никита Полевой: А как мне брать несколько массивов динамически?
    Вот например в распринтовке этого массива лежат несколько вложенных массивов.

    ПРИМЕР:
    В моем случае в массиве [ITEMS] лежит массив [0] в котором лежат нужные данные:

    [ITEMS] => Array(
    [AnDelCanBuy] => Array(
    [0] => Array(
    [ID] => 11953[~ID] => 11953[NAME] => и т.д.

    Но также в массиве лежит другой массив с такой же структурой, но другими данными другого товара.
    Он имеет уже индекс 1, массив [1]:
    [1] => Array(
    [ID] => 12116[~ID] => 12116[NAME] => и т.д.

    Как в мой скрипт добавлять новые экземпляры переменных id и number для n-массивов?

    То есть по факту мне нужно чтобы было:
    window.ad_products = [{
    "id": "<?php echo $arResult['ITEMS']['AnDelCanBuy']['0']['PRODUCT_ID']; ?>",
    "number": "<?php echo $arResult['ITEMS']['AnDelCanBuy']['0']['QUANTITY']; ?>"

    "id": "<?php echo $arResult['ITEMS']['AnDelCanBuy']['1']['PRODUCT_ID']; ?>",
    "number": "<?php echo $arResult['ITEMS']['AnDelCanBuy']['1']['QUANTITY']; ?>"
    }
    ];
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Никита Полевой: Все было в большой вложенности одних массивов в другой
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Не помогло
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Нормально работает в других скриптах, кеш сбрасывается каждый раз перед проверкой
  • Что не так с Java скриптом?

    gold_dezmor
    @gold_dezmor Автор вопроса
    Array ( [WARNING_MESSAGE] => Array ( ) [ERROR_MESSAGE] => [ITEMS] => Array ( [AnDelCanBuy] => Array ( [0] => Array ( [ID] => 11953 [~ID] => 11953 [NAME] => Форма для выпечки TalleR TR-6215 [~NAME] => Форма для выпечки TalleR TR-6215 [CALLBACK_FUNC] => [~CALLBACK_FUNC] => [MODULE] => catalog [~MODULE] => catalog [PRODUCT_ID] => 3460 [~PRODUCT_ID] => 3460 [PRODUCT_PRICE_ID] => 12792 [~PRODUCT_PRICE_ID] => 12792 [QUANTITY] => 1 [~QUANTITY] => 1.00 [DELAY] => N [~DELAY] => N [CAN_BUY] => Y [~CAN_BUY] => Y [PRICE] => 582 [~PRICE] => 582 [WEIGHT] => 213 [~WEIGHT] => 213.00 [DETAIL_PAGE_URL] => /catalog/formy_dlya_vypechki/silikonovye_formy/forma_dlya_vypechki_taller_tr_6215/ [~DETAIL_PAGE_URL] => /catalog/formy_dlya_vypechki/silikonovye_formy/forma_dlya_vypechki_taller_tr_6215/ [NOTES] => Интернет цена [~NOTES] => Интернет цена [CURRENCY] => RUB [~CURRENCY] => RUB [VAT_RATE] => 0.0000 [~VAT_RATE] => 0.0000 [CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [~CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [PRODUCT_XML_ID] => f52b0fb9-c17c-11e4-99c5-bcec9209737e [~PRODUCT_XML_ID] => f52b0fb9-c17c-11e4-99c5-bcec9209737e [SUBSCRIBE] => N [~SUBSCRIBE] => N [DISCOUNT_PRICE] => 102 [~DISCOUNT_PRICE] => 102 [PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [~PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [TYPE] => [~TYPE] => [SET_PARENT_ID] => [~SET_PARENT_ID] => [PROPS] => Array ( ) [MEASURE_TEXT] => шт [MEASURE] => 5 [MEASURE_RATIO] => 1 [AVAILABLE_QUANTITY] => 9 [PRICE_VAT_VALUE] => 0 [PRICE_FORMATED] => 582 руб. [WEIGHT_FORMATED] => 213 г [PREVIEW_PICTURE] => 30772 [DETAIL_PICTURE] => 58353 [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [PREVIEW_PICTURE_SRC] => /upload/resize_cache/iblock/f52/110_110_1/f528387196754aed05af6b3230c53b5f.jpeg [DETAIL_PICTURE_SRC] => /upload/resize_cache/iblock/c31/110_110_1/c31491fb4e1b3043a1028bfe51016c65.jpeg [DISCOUNT_PRICE_PERCENT] => 15 [DISCOUNT_PRICE_PERCENT_FORMATED] => 15.00% [FULL_PRICE] => 684 [FULL_PRICE_FORMATED] => 684 руб. [BASE_PRICE] => 684 [SUM] => 582 руб. ) [1] => Array ( [ID] => 12116 [~ID] => 12116 [NAME] => Набор посуды TalleR TR-1060 [~NAME] => Набор посуды TalleR TR-1060 [CALLBACK_FUNC] => [~CALLBACK_FUNC] => [MODULE] => catalog [~MODULE] => catalog [PRODUCT_ID] => 3462 [~PRODUCT_ID] => 3462 [PRODUCT_PRICE_ID] => 12794 [~PRODUCT_PRICE_ID] => 12794 [QUANTITY] => 1 [~QUANTITY] => 1.00 [DELAY] => N [~DELAY] => N [CAN_BUY] => Y [~CAN_BUY] => Y [PRICE] => 6498 [~PRICE] => 6498 [WEIGHT] => 4425 [~WEIGHT] => 4425.00 [DETAIL_PAGE_URL] => /catalog/nabory_posudy/nabor_posudy_taller_tr_1060_brilon/ [~DETAIL_PAGE_URL] => /catalog/nabory_posudy/nabor_posudy_taller_tr_1060_brilon/ [NOTES] => Интернет цена [~NOTES] => Интернет цена [CURRENCY] => RUB [~CURRENCY] => RUB [VAT_RATE] => 0.0000 [~VAT_RATE] => 0.0000 [CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [~CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [PRODUCT_XML_ID] => ea529272-c71a-11e4-99c5-bcec9209737e [~PRODUCT_XML_ID] => ea529272-c71a-11e4-99c5-bcec9209737e [SUBSCRIBE] => N [~SUBSCRIBE] => N [DISCOUNT_PRICE] => 0 [~DISCOUNT_PRICE] => 0 [PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [~PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [TYPE] => [~TYPE] => [SET_PARENT_ID] => [~SET_PARENT_ID] => [PROPS] => Array ( ) [MEASURE_TEXT] => шт [MEASURE] => 5 [MEASURE_RATIO] => 1 [AVAILABLE_QUANTITY] => 5 [PRICE_VAT_VALUE] => 0 [PRICE_FORMATED] => 6 498 руб. [WEIGHT_FORMATED] => 4425 г [PREVIEW_PICTURE] => 30776 [DETAIL_PICTURE] => 55789 [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [PREVIEW_PICTURE_SRC] => /upload/resize_cache/iblock/7b5/110_110_1/7b57f0b1ea09b1df75a671a7612aca45.jpeg [DETAIL_PICTURE_SRC] => /upload/resize_cache/iblock/a8d/110_110_1/a8df9454e429aa386b642dd20f1cf42f.jpeg [DISCOUNT_PRICE_PERCENT] => 0 [DISCOUNT_PRICE_PERCENT_FORMATED] => 0.00% [FULL_PRICE] => 6498 [FULL_PRICE_FORMATED] => 6 498 руб. [BASE_PRICE] => 6498 [SUM] => 6 498 руб. ) ) [DelDelCanBuy] => Array ( ) [nAnCanBuy] => Array ( ) [ProdSubscribe] => Array ( ) ) [EVENT_ONCHANGE_ON_START] => N [ShowReady] => Y [ShowDelay] => N [ShowNotAvail] => N [ShowSubscribe] => N [GRID] => Array ( [ROWS] => Array ( [11953] => Array ( [ID] => 11953 [~ID] => 11953 [NAME] => Форма для выпечки TalleR TR-6215 [~NAME] => Форма для выпечки TalleR TR-6215 [CALLBACK_FUNC] => [~CALLBACK_FUNC] => [MODULE] => catalog [~MODULE] => catalog [PRODUCT_ID] => 3460 [~PRODUCT_ID] => 3460 [PRODUCT_PRICE_ID] => 12792 [~PRODUCT_PRICE_ID] => 12792 [QUANTITY] => 1 [~QUANTITY] => 1.00 [DELAY] => N [~DELAY] => N [CAN_BUY] => Y [~CAN_BUY] => Y [PRICE] => 582 [~PRICE] => 582 [WEIGHT] => 213 [~WEIGHT] => 213.00 [DETAIL_PAGE_URL] => /catalog/formy_dlya_vypechki/silikonovye_formy/forma_dlya_vypechki_taller_tr_6215/ [~DETAIL_PAGE_URL] => /catalog/formy_dlya_vypechki/silikonovye_formy/forma_dlya_vypechki_taller_tr_6215/ [NOTES] => Интернет цена [~NOTES] => Интернет цена [CURRENCY] => RUB [~CURRENCY] => RUB [VAT_RATE] => 0.0000 [~VAT_RATE] => 0.0000 [CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [~CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [PRODUCT_XML_ID] => f52b0fb9-c17c-11e4-99c5-bcec9209737e [~PRODUCT_XML_ID] => f52b0fb9-c17c-11e4-99c5-bcec9209737e [SUBSCRIBE] => N [~SUBSCRIBE] => N [DISCOUNT_PRICE] => 102 [~DISCOUNT_PRICE] => 102 [PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [~PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [TYPE] => [~TYPE] => [SET_PARENT_ID] => [~SET_PARENT_ID] => [PROPS] => Array ( ) [MEASURE_TEXT] => шт [MEASURE] => 5 [MEASURE_RATIO] => 1 [AVAILABLE_QUANTITY] => 9 [PRICE_VAT_VALUE] => 0 [PRICE_FORMATED] => 582 руб. [WEIGHT_FORMATED] => 213 г [PREVIEW_PICTURE] => 30772 [DETAIL_PICTURE] => 58353 [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [PREVIEW_PICTURE_SRC] => /upload/resize_cache/iblock/f52/110_110_1/f528387196754aed05af6b3230c53b5f.jpeg [DETAIL_PICTURE_SRC] => /upload/resize_cache/iblock/c31/110_110_1/c31491fb4e1b3043a1028bfe51016c65.jpeg [DISCOUNT_PRICE_PERCENT] => 15 [DISCOUNT_PRICE_PERCENT_FORMATED] => 15.00% [FULL_PRICE] => 684 [FULL_PRICE_FORMATED] => 684 руб. [BASE_PRICE] => 684 [SUM] => 582 руб. ) [12116] => Array ( [ID] => 12116 [~ID] => 12116 [NAME] => Набор посуды TalleR TR-1060 [~NAME] => Набор посуды TalleR TR-1060 [CALLBACK_FUNC] => [~CALLBACK_FUNC] => [MODULE] => catalog [~MODULE] => catalog [PRODUCT_ID] => 3462 [~PRODUCT_ID] => 3462 [PRODUCT_PRICE_ID] => 12794 [~PRODUCT_PRICE_ID] => 12794 [QUANTITY] => 1 [~QUANTITY] => 1.00 [DELAY] => N [~DELAY] => N [CAN_BUY] => Y [~CAN_BUY] => Y [PRICE] => 6498 [~PRICE] => 6498 [WEIGHT] => 4425 [~WEIGHT] => 4425.00 [DETAIL_PAGE_URL] => /catalog/nabory_posudy/nabor_posudy_taller_tr_1060_brilon/ [~DETAIL_PAGE_URL] => /catalog/nabory_posudy/nabor_posudy_taller_tr_1060_brilon/ [NOTES] => Интернет цена [~NOTES] => Интернет цена [CURRENCY] => RUB [~CURRENCY] => RUB [VAT_RATE] => 0.0000 [~VAT_RATE] => 0.0000 [CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [~CATALOG_XML_ID] => catalog-2dd10d52-9217-4cea-af2a-faad28abd6db [PRODUCT_XML_ID] => ea529272-c71a-11e4-99c5-bcec9209737e [~PRODUCT_XML_ID] => ea529272-c71a-11e4-99c5-bcec9209737e [SUBSCRIBE] => N [~SUBSCRIBE] => N [DISCOUNT_PRICE] => 0 [~DISCOUNT_PRICE] => 0 [PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [~PRODUCT_PROVIDER_CLASS] => CCatalogProductProvider [TYPE] => [~TYPE] => [SET_PARENT_ID] => [~SET_PARENT_ID] => [PROPS] => Array ( ) [MEASURE_TEXT] => шт [MEASURE] => 5 [MEASURE_RATIO] => 1 [AVAILABLE_QUANTITY] => 5 [PRICE_VAT_VALUE] => 0 [PRICE_FORMATED] => 6 498 руб. [WEIGHT_FORMATED] => 4425 г [PREVIEW_PICTURE] => 30776 [DETAIL_PICTURE] => 55789 [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE] => [PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [~PROPERTY_LOGICTIM_BONUS_BALLS_VALUE_ID] => [PREVIEW_PICTURE_SRC] => /upload/resize_cache/iblock/7b5/110_110_1/7b57f0b1ea09b1df75a671a7612aca45.jpeg [DETAIL_PICTURE_SRC] => /upload/resize_cache/iblock/a8d/110_110_1/a8df9454e429aa386b642dd20f1cf42f.jpeg [DISCOUNT_PRICE_PERCENT] => 0 [DISCOUNT_PRICE_PERCENT_FORMATED] => 0.00% [FULL_PRICE] => 6498 [FULL_PRICE_FORMATED] => 6 498 руб. [BASE_PRICE] => 6498 [SUM] => 6 498 руб. ) ) [HEADERS] => Array ( [0] => Array ( [id] => NAME [name] => ) [1] => Array ( [id] => DISCOUNT [name] => ) [2] => Array ( [id] => DELETE [name] => ) [3] => Array ( [id] => PROPERTY_LOGICTIM_BONUS_BALLS_VALUE [name] => Бонусные баллы ) [4] => Array ( [id] => QUANTITY [name] => ) [5] => Array ( [id] => PRICE [name] => ) ) ) [allSum] => 7080 [allWeight] => 4638 [allWeight_FORMATED] => 4638 г [allSum_FORMATED] => 7 080 руб. [DISCOUNT_PRICE_FORMATED] => [PRICE_WITHOUT_DISCOUNT] => 7 182 руб. [allVATSum] => 0 [allVATSum_FORMATED] => 0 руб. [allSum_wVAT_FORMATED] => 7 080 руб. [COUPON_LIST] => Array ( ) [COUPON] => [DISCOUNT_PRICE_ALL] => 102 [APPLIED_DISCOUNT_LIST] => Array ( ) [FULL_DISCOUNT_LIST] => Array ( [0] => Array ( [ID] => 12 [PRIORITY] => 2000002 [SORT] => 100 [LAST_DISCOUNT] => N [UNPACK] => function($arOrder){return ((CSaleBasketFilter::AmountFilter($arOrder, "") >= 3000)); }; [APPLICATION] => function (&$arOrder){CSaleDiscountActionApply::ApplyDelivery($arOrder, -100, "P", false);}; [USE_COUPONS] => N [EXECUTE_MODULE] => all [NAME] => Бесплатная доставка от 3000 руб. [CONDITIONS_LIST] => Array ( [CLASS_ID] => CondGroup [DATA] => Array ( [All] => AND [True] => True ) [CHILDREN] => Array ( [0] => Array ( [CLASS_ID] => CondBsktAmtGroup [DATA] => Array ( [logic] => EqGr [Value] => 3000 [All] => AND ) [CHILDREN] => Array ( ) ) ) ) [ACTIONS_LIST] => Array ( [CLASS_ID] => CondGroup [DATA] => Array ( [All] => AND ) [CHILDREN] => Array ( [0] => Array ( [CLASS_ID] => ActSaleDelivery [DATA] => Array ( [Type] => Discount [Value] => 100 [Unit] => Perc ) ) ) ) [MODULE] => sale [MODULE_ID] => sale ) ) [DISCOUNT_PRICE_ALL_FORMATED] => 102 руб. [NO_PHOTO] => Array ( [src] => /upload/resize_cache/redsign_devfunc_nophoto/669/40_40_140cd750bba9870f18aada2478b24840a/669eada97d02dc1076f2a3be071e5af0.png [width] => 40 [height] => 40 [size] => 2062 ) [HAVE_PRODUCT_TYPE] => Array ( [ITEMS] => 1 [DELAYED] => [NOT_AVAILABLE] => [SUBSCRIBED] => ) )