GetMessage("PROPERTY_ARTICLE_HEADER_NAME"), "manufacturer" => GetMessage("PROPERTY_MANUFACTURER_HEADER_NAME"), "color" => GetMessage("PROPERTY_COLOR_HEADER_NAME"), "size" => GetMessage("PROPERTY_SIZE_HEADER_NAME"), "weight" => GetMessage("PROPERTY_WEIGHT_HEADER_NAME"), "length" => GetMessage("PROPERTY_LENGTH_HEADER_NAME"), "width" => GetMessage("PROPERTY_WIDTH_HEADER_NAME"), "height" => GetMessage("PROPERTY_HEIGHT_HEADER_NAME"), ); $iblockFieldsName = Array( "weight" => Array("code" => "catalog_size" , "name" => GetMessage("SELECT_WEIGHT_PROPERTY_NAME"), 'unit' => 'mass'), "length" => Array("code" => "catalog_length" , "name" => GetMessage("SELECT_LENGTH_PROPERTY_NAME"), 'unit' => 'length'), "width" => Array("code" => "catalog_width" , "name" => GetMessage("SELECT_WIDTH_PROPERTY_NAME"), 'unit' => 'length'), "height" => Array("code" => "catalog_height" , "name" => GetMessage("SELECT_HEIGHT_PROPERTY_NAME"), 'unit' => 'length'), ); $iblockPropertiesHint = Array( "article" => Array("ARTICLE", "ART", "ARTNUMBER", "ARTICUL", "ARTIKUL"), "manufacturer" => Array("MANUFACTURER", "PROISVODITEL", "PROISVOD", "PROISV"), "color" => Array("COLOR", "CVET"), "size" => Array("SIZE", "RAZMER"), "weight" => Array("WEIGHT", "VES", "VEC"), "length" => Array("LENGTH", "DLINA"), "width" => Array("WIDTH", "SHIRINA"), "height" => Array("HEIGHT", "VISOTA"), ); $units = Array( 'length' => Array( 'mm' => GetMessage("UNIT_MEASUREMENT_MM"), 'cm' => GetMessage("UNIT_MEASUREMENT_CM"), 'm' => GetMessage("UNIT_MEASUREMENT_M"), ), 'mass' => Array( 'mg' => GetMessage("UNIT_MEASUREMENT_MG"), 'g' => GetMessage("UNIT_MEASUREMENT_G"), 'kg' => GetMessage("UNIT_MEASUREMENT_KG"), ) ); $hintUnit = Array( 'length' => 'mm', 'mass' => 'g' ); $boolAll = false; $intCountChecked = 0; $intCountAvailIBlock = 0; $arIBlockList = array(); $db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W')); while ($iblock = $db_res->Fetch()) { if ($arCatalog = CCatalog::GetByIDExt($iblock["ID"])) { if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P") { $propertiesSKU = null; if ($arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P") { $iblockOffer = CCatalogSKU::GetInfoByProductIBlock($iblock["ID"]); $db_properties = CIBlock::GetProperties($iblockOffer['IBLOCK_ID'], Array()); while($prop = $db_properties->Fetch()) $propertiesSKU[] = $prop; $oldPropertySKU = null; if (isset($IBLOCK_PROPERTY_SKU[$iblock['ID']])) { foreach ($iblockPropertiesName as $key => $prop) { $oldPropertySKU[$key] = $IBLOCK_PROPERTY_SKU[$iblock['ID']][$key]; } } $oldPropertyUnitSKU = null; if (isset($IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']])) { foreach ($iblockPropertiesName as $key => $prop) { $oldPropertyUnitSKU[$key] = $IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']][$key]; } } } $propertiesProduct = null; $db_properties = CIBlock::GetProperties($iblock['ID'], Array()); while($prop = $db_properties->Fetch()) $propertiesProduct[] = $prop; $oldPropertyProduct = null; if (isset($IBLOCK_PROPERTY_PRODUCT[$iblock['ID']])) { foreach ($iblockPropertiesName as $key => $prop) { $oldPropertyProduct[$key] = $IBLOCK_PROPERTY_PRODUCT[$iblock['ID']][$key]; } } $oldPropertyUnitProduct = null; if (isset($IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']])) { foreach ($iblockPropertiesName as $key => $prop) { $oldPropertyUnitProduct[$key] = $IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']][$key]; } } $arSiteList = array(); $rsSites = CIBlock::GetSite($iblock["ID"]); while ($arSite = $rsSites->Fetch()) { $arSiteList[] = $arSite["SITE_ID"]; } if (count($IBLOCK_EXPORT) != 0) $boolExport = (in_array($iblock['ID'], $IBLOCK_EXPORT)); else $boolExport = true; $arIBlockList[] = array( 'ID' => $iblock['ID'], 'NAME' => $iblock['NAME'], 'IBLOCK_TYPE_ID' => $iblock['IBLOCK_TYPE_ID'], 'IBLOCK_EXPORT' => $boolExport, 'PROPERTIES_SKU' => $propertiesSKU, 'PROPERTIES_PRODUCT' => $propertiesProduct, 'OLD_PROPERTY_SKU_SELECT' => $oldPropertySKU, 'OLD_PROPERTY_UNIT_SKU_SELECT' => $oldPropertyUnitSKU, 'OLD_PROPERTY_PRODUCT_SELECT' => $oldPropertyProduct, 'OLD_PROPERTY_UNIT_PRODUCT_SELECT' => $oldPropertyUnitProduct, 'SITE_LIST' => '('.implode(' ',$arSiteList).')', ); if ($boolExport) $intCountChecked++; $intCountAvailIBlock++; } } } if (count($IBLOCK_EXPORT) != 0) { if ($intCountChecked == $intCountAvailIBlock) $boolAll = true; } else { $intCountChecked = $intCountAvailIBlock; $boolAll = true; } ?> >

$arIBlock):?>
]" id="IBLOCK_EXPORT" value="" onclick="checkOne(this,);" >

> $property): ?>















 

 


  " size="30">


" class="adm-btn-save">
" class="adm-btn-save">