From e8b1a78cdf5ff71f7c447e40cd553ea47c7fdba9 Mon Sep 17 00:00:00 2001 From: "m.korolev" Date: Thu, 25 Jul 2013 09:42:08 +0400 Subject: [PATCH] bugfix ProductName and XML ID --- intaro.intarocrm/install/export/intarocrm_run.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/intaro.intarocrm/install/export/intarocrm_run.php b/intaro.intarocrm/install/export/intarocrm_run.php index 6b649394..e27a5c54 100755 --- a/intaro.intarocrm/install/export/intarocrm_run.php +++ b/intaro.intarocrm/install/export/intarocrm_run.php @@ -13,6 +13,8 @@ while ($res = $db_res->Fetch()) $arCat = CCatalog::GetByIDExt($res["ID"]); if($arCat['CATALOG_TYPE'] == "D" || $arCat['CATALOG_TYPE'] == "X" || $arCat['CATALOG_TYPE'] == "P") $arIBlockId[] = $res["ID"]; + + } } @@ -478,7 +480,7 @@ else } if (empty($arRunErrors)) { -/* if ($GLOBALS["APPLICATION"]->GetFileAccessPermission($SETUP_FILE_NAME) < "W") +/* if ($GLOBALS["APPLICATION"]->GetFileAccessPermission($SETUP_FILE_NAME) < "W") { $arRunErrors[] = str_replace('#FILE#', $SETUP_FILE_NAME,GetMessage('YANDEX_ERR_FILE_ACCESS_DENIED')); } */ @@ -668,6 +670,7 @@ if (empty($arRunErrors)) $arAcc['CATALOG_QUANTITY'] = ''; $arAcc['CATALOG_QUANTITY_TRACE'] = 'N'; $arProduct = CCatalogProduct::GetByID($arAcc['ID']); + if (!empty($arProduct)) { $arAcc['CATALOG_QUANTITY'] = $arProduct['QUANTITY']; @@ -864,10 +867,12 @@ if (empty($arRunErrors)) } break; case 'xml_id': - $strTmpOff .= "".yandex_text2xml($arProduct["EXTERNAL_ID"], true)."\n"; + + + $strTmpOff .= "".yandex_text2xml($arAcc["EXTERNAL_ID"], true)."\n"; break; case 'product_name': - $strTmpOff .= "".yandex_text2xml($arProduct["NAME"], true)."\n"; + $strTmpOff .= "".yandex_text2xml($arAcc["NAME"], true)."\n"; break; case 'model': case 'title': @@ -1863,6 +1868,7 @@ if (empty($arRunErrors)) @fwrite($fp, "\n"); @fclose($fp); + } CCatalogDiscountSave::Enable();