1
0
mirror of synced 2024-11-23 05:46:09 +03:00
bitrix-module/intaro.intarocrm/export/export_run.php

44 lines
1.2 KiB
PHP
Raw Normal View History

2013-09-12 17:31:32 +04:00
<?php
set_time_limit(0);
global $APPLICATION;
if (!CModule::IncludeModule("iblock"))
return;
if (!CModule::IncludeModule("catalog"))
return;
if (!CModule::IncludeModule("intaro.intarocrm"))
return;
2013-10-02 17:42:20 +04:00
$iblockProperties = Array(
"article" => "article",
"manufacturer" => "manufacturer",
"color" =>"color",
"weight" => "weight",
"size" => "size",
);
$IBLOCK_PROPERTY_SKU = array();
foreach ($iblockProperties as $prop) {
$skuProps = ('IBLOCK_PROPERTY_SKU' . "_" . $prop);
$skuProps = $$skuProps;
foreach ($skuProps as $iblock => $val) {
$IBLOCK_PROPERTY_SKU[$iblock][$prop] = $val;
}
}
$IBLOCK_PROPERTY_PRODUCT = array();
foreach ($iblockProperties as $prop) {
$skuProps = "IBLOCK_PROPERTY_PRODUCT" . "_" . $prop;
$skuProps = $$skuProps;
foreach ($skuProps as $iblock => $val) {
$IBLOCK_PROPERTY_PRODUCT[$iblock][$prop] = $val;
}
}
2013-09-12 17:31:32 +04:00
$loader = new ICMLLoader();
$loader->iblocks = $IBLOCK_EXPORT;
2013-09-13 16:15:54 +04:00
$loader->propertiesSKU = $IBLOCK_PROPERTY_SKU;
$loader->propertiesProduct = $IBLOCK_PROPERTY_PRODUCT;
2013-09-12 17:31:32 +04:00
$loader->filename = $SETUP_FILE_NAME;
$loader->application = $APPLICATION;
$loader->Load();