Articles is not modatory now
This commit is contained in:
parent
57335ffb54
commit
b1a71726fc
@ -17,7 +17,7 @@ class ICMLLoader {
|
||||
if(!isset($USER))
|
||||
$USER = new CUser;
|
||||
|
||||
if (count($this->iblocks) != count($this->articleProperties))
|
||||
if (count($this->iblocks) < count($this->articleProperties))
|
||||
return false;
|
||||
|
||||
$categories = $this->GetCategories();
|
||||
@ -164,10 +164,13 @@ class ICMLLoader {
|
||||
"DETAIL_TEXT",
|
||||
"DETAIL_PICTURE",
|
||||
"LANG_DIR",
|
||||
"DETAIL_PAGE_URL",
|
||||
"PROPERTY_" . $this->articleProperties[$id]
|
||||
"DETAIL_PAGE_URL"
|
||||
);
|
||||
|
||||
if (isset($this->articleProperties[$id]))
|
||||
$arSelect[] = "PROPERTY_" . $this->articleProperties[$id];
|
||||
|
||||
|
||||
$filter = Array (
|
||||
"IBLOCK_ID" => $id,
|
||||
"ACTIVE_DATE" => "Y",
|
||||
@ -194,9 +197,10 @@ class ICMLLoader {
|
||||
"NAME",
|
||||
"DETAIL_TEXT",
|
||||
"DETAIL_PAGE_URL",
|
||||
"DETAIL_PICTURE",
|
||||
"PROPERTY_" . $this->articleProperties[$id]
|
||||
"DETAIL_PICTURE"
|
||||
);
|
||||
if (isset($this->articleProperties[$id]))
|
||||
$arSelectOffer[] = "PROPERTY_" . $this->articleProperties[$id];
|
||||
|
||||
$rsOffers = CIBlockElement::GetList(array(), $arFilterOffer, false, false, $arSelectOffer);
|
||||
while ($arOffer = $rsOffers->GetNext()) {
|
||||
@ -215,6 +219,7 @@ class ICMLLoader {
|
||||
$arOffer['DETAIL_PICTURE'] = $product["DETAIL_PICTURE"];
|
||||
$arOffer['PREVIEW_PICTURE'] = $product["PREVIEW_PICTURE"];
|
||||
$arOffer['PRODUCT_NAME'] = $product["NAME"];
|
||||
if (isset($this->articleProperties[$id]))
|
||||
$arOffer['ARTICLE'] = $arOffer["PROPERTY_" . $this->articleProperties[$id] . "_VALUE"];
|
||||
|
||||
$dbPrice = GetCatalogProductPrice($arOffer["ID"],1);
|
||||
@ -239,6 +244,7 @@ class ICMLLoader {
|
||||
|
||||
$product['PRODUCT_ID'] = $product["ID"];
|
||||
$product['PRODUCT_NAME'] = $product["NAME"];
|
||||
if (isset($this->articleProperties[$id]))
|
||||
$product['ARTICLE'] = $product["PROPERTY_" . $this->articleProperties[$id] . "_VALUE"];
|
||||
|
||||
$dbPrice = GetCatalogProductPrice($product["ID"],1);
|
||||
@ -289,6 +295,7 @@ class ICMLLoader {
|
||||
|
||||
$offer .= "<xmlId>" . $this->PrepareValue($arOffer["EXTERNAL_ID"]) . "</xmlId>\n";
|
||||
$offer .= "<productName>" . $this->PrepareValue($arOffer["PRODUCT_NAME"]) . "</productName>\n";
|
||||
if (isset($arOffer["ARTICLE"]))
|
||||
$offer .= "<article>" . $this->PrepareValue($arOffer["ARTICLE"]) . "</article>\n";
|
||||
|
||||
$offer.= "</offer>\n";
|
||||
|
@ -22,7 +22,7 @@ if ($STEP>1)
|
||||
{
|
||||
|
||||
|
||||
if (count($IBLOCK_EXPORT) != count($IBLOCK_PROPERTY_ARTICLE))
|
||||
if (count($IBLOCK_EXPORT) < count($IBLOCK_PROPERTY_ARTICLE))
|
||||
$arSetupErrors[] = GetMessage("ERROR_ARTICLE_NOT_SET");
|
||||
|
||||
if (strlen($SETUP_FILE_NAME)<=0)
|
||||
@ -159,8 +159,8 @@ if ($STEP==1)
|
||||
<font class="tablebodytext">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="IBLOCK_EXPORT[<?=$key?>]"
|
||||
id="IBLOCK_EXPORT<?=$key?>"
|
||||
name="IBLOCK_EXPORT[<?=$arIBlock["ID"]?>]"
|
||||
id="IBLOCK_EXPORT<?=$arIBlock["ID"]?>"
|
||||
value="<?=$arIBlock["ID"]?>"
|
||||
<? if ($arIBlock['IBLOCK_EXPORT']) echo " checked"; ?>
|
||||
onclick="checkOne(this,<? echo $intCountAvailIBlock; ?>);"
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?
|
||||
//<title>IntaroCRM</title>
|
||||
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/intaro.intarocrm/export/load/export_run.php");
|
||||
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/export/export_run.php");
|
@ -1,3 +1,3 @@
|
||||
<?
|
||||
//<title>IntaroCRM</title>
|
||||
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/intaro.intarocrm/export/load/export_setup.php");
|
||||
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/export/export_setup.php");
|
@ -677,7 +677,7 @@ class intaro_intarocrm extends CModule
|
||||
else
|
||||
$filename = $_POST['SETUP_FILE_NAME'];
|
||||
|
||||
if (count($iblocks) != count($articleProperties))
|
||||
if (count($iblocks) < count($articleProperties))
|
||||
$arResult['errCode'] = 'ERR_ARTICLE_IBLOCK';
|
||||
|
||||
|
||||
@ -694,6 +694,8 @@ class intaro_intarocrm extends CModule
|
||||
if ($typeLoading != 'none' && $profileName == "")
|
||||
$arResult['errCode'] = 'ERR_FIELDS_PROFILE';
|
||||
|
||||
if($filename == "")
|
||||
$arResult['errCode'] = 'ERR_FIELDS_FILE';
|
||||
|
||||
if(isset($arResult['errCode']) && $arResult['errCode']) {
|
||||
|
||||
|
@ -12,6 +12,6 @@ $MESS["CET_SAVE"] = "Сохранить";
|
||||
$MESS["ERROR_IBLOCK_MODULE"] = "Модуль Инфоблоки не установлен";
|
||||
$MESS["ERROR_IBLOCK_CATALOG"] = "Модуль Каталог не установлен";
|
||||
$MESS["ERROR_IBLOCK_INTAROCRM"] = "Модуль IntaroCRM не установлен";
|
||||
$MESS["ERROR_ARTICLE_NOT_SET"] = "Не установлены поля артикулов";
|
||||
$MESS["ERROR_ARTICLE_NOT_SET"] = "Были установлены поля артикулов, но не установлены Информационные блоки";
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user