diff --git a/intaro.intarocrm/update.php b/intaro.intarocrm/update.php deleted file mode 100644 index 29166cfb..00000000 --- a/intaro.intarocrm/update.php +++ /dev/null @@ -1,109 +0,0 @@ - "Y", "FILE_NAME" => "intarocrm") -); -while ($arProfile = $dbProfile->Fetch()) -{ - $PROFILE_ID = intval($arProfile["ID"]); - - parse_str($arProfile['SETUP_VARS']); - - $propertiesSKU = Array(); - $propertiesProduct = Array(); - - foreach ($IBLOCK_EXPORT as $iblock) { - - $propertiesSKU[$iblock] = Array( - "article" => null, - "manufacturer" => null, - "color" => null, - "weight" => null, - "size" => null, - ); - - $propertiesProduct[$iblock] = Array( - "article" => $IBLOCK_PROPERTY_ARTICLE[$iblock], - "manufacturer" => null, - "color" => null, - "weight" => null, - "size" => null, - ); - } - - $strVars = GetProfileSetupVars($IBLOCK_EXPORT, $propertiesProduct, $propertiesSKU, $SETUP_FILE_NAME); - - CCatalogExport::Update( - $PROFILE_ID, - array( - "SETUP_VARS" => $strVars - ) - ); - - -} - -function GetProfileSetupVars($iblocks, $propertiesProduct, $propertiesSKU, $filename) { - - $strVars = ""; - foreach ($iblocks as $key => $val) - $strVars .= 'IBLOCK_EXPORT[' . $key . ']=' . $val . '&'; - foreach ($propertiesSKU as $iblock => $arr) - foreach ($arr as $id => $val) - $strVars .= 'IBLOCK_PROPERTY_SKU[' . $iblock . '][' . $id . ']=' . $val . '&'; - foreach ($propertiesProduct as $iblock => $arr) - foreach ($arr as $id => $val) - $strVars .= 'IBLOCK_PROPERTY_PRODUCT[' . $iblock . '][' . $id . ']=' . $val . '&'; - - $strVars .= 'SETUP_FILE_NAME=' . urlencode($filename); - - return $strVars; -}