Purchase price loading
This commit is contained in:
parent
92d559d822
commit
2406c71652
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.DS_Store
|
||||||
|
*~
|
||||||
|
/nbproject/*
|
||||||
|
/.idea/*
|
||||||
|
/*tags*
|
||||||
|
.idea
|
||||||
|
.idea/*
|
||||||
|
/.idea
|
||||||
|
/.idea/*
|
||||||
|
.travis.yml
|
||||||
|
|
@ -14,6 +14,7 @@ class ICMLLoader {
|
|||||||
public $application;
|
public $application;
|
||||||
public $encoding = 'utf-8';
|
public $encoding = 'utf-8';
|
||||||
public $encodingDefault = 'utf-8';
|
public $encodingDefault = 'utf-8';
|
||||||
|
public $loadPurchasePrice = false;
|
||||||
|
|
||||||
protected $fp;
|
protected $fp;
|
||||||
protected $mainSection = 1000000;
|
protected $mainSection = 1000000;
|
||||||
@ -394,6 +395,7 @@ class ICMLLoader {
|
|||||||
$offer['PRODUCT_NAME'] = $product["NAME"];
|
$offer['PRODUCT_NAME'] = $product["NAME"];
|
||||||
$offer['PRODUCT_ACTIVE'] = $product["ACTIVE"];
|
$offer['PRODUCT_ACTIVE'] = $product["ACTIVE"];
|
||||||
$offer['PRICE'] = $offer['CATALOG_PRICE_1'];
|
$offer['PRICE'] = $offer['CATALOG_PRICE_1'];
|
||||||
|
$offer['PURCHASE_PRICE'] = $offer['CATALOG_PURCHASING_PRICE'];
|
||||||
$offer['QUANTITY'] = $offer["CATALOG_QUANTITY"];
|
$offer['QUANTITY'] = $offer["CATALOG_QUANTITY"];
|
||||||
|
|
||||||
// Get properties of product
|
// Get properties of product
|
||||||
@ -432,6 +434,7 @@ class ICMLLoader {
|
|||||||
$product['PRODUCT_NAME'] = $product["NAME"];
|
$product['PRODUCT_NAME'] = $product["NAME"];
|
||||||
$product['PRODUCT_ACTIVE'] = $product["ACTIVE"];
|
$product['PRODUCT_ACTIVE'] = $product["ACTIVE"];
|
||||||
$product['PRICE'] = $product['CATALOG_PRICE_1'];
|
$product['PRICE'] = $product['CATALOG_PRICE_1'];
|
||||||
|
$product['PURCHASE_PRICE'] = $product['CATALOG_PURCHASING_PRICE'];
|
||||||
$product['QUANTITY'] = $product["CATALOG_QUANTITY"];
|
$product['QUANTITY'] = $product["CATALOG_QUANTITY"];
|
||||||
|
|
||||||
foreach ($resPropertiesProduct as $key => $propProduct) {
|
foreach ($resPropertiesProduct as $key => $propProduct) {
|
||||||
@ -494,6 +497,9 @@ class ICMLLoader {
|
|||||||
$offer .= "<url>" . ($_SERVER["HTTPS"] == 'on' ? "https://" : "http://") . $_SERVER['SERVER_NAME'] . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "</url>\n";
|
$offer .= "<url>" . ($_SERVER["HTTPS"] == 'on' ? "https://" : "http://") . $_SERVER['SERVER_NAME'] . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "</url>\n";
|
||||||
|
|
||||||
$offer .= "<price>" . $this->PrepareValue($arOffer['PRICE']) . "</price>\n";
|
$offer .= "<price>" . $this->PrepareValue($arOffer['PRICE']) . "</price>\n";
|
||||||
|
if ($arOffer['PURCHASE_PRICE'] && $this->loadPurchasePrice) {
|
||||||
|
$offer .= "<purchasePrice>" . $this->PrepareValue($arOffer['PURCHASE_PRICE']) . "</purchasePrice>\n";
|
||||||
|
}
|
||||||
foreach ($categories as $category)
|
foreach ($categories as $category)
|
||||||
$offer .= "<categoryId>" . $category['ID'] . "</categoryId>\n";
|
$offer .= "<categoryId>" . $category['ID'] . "</categoryId>\n";
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ $iblockProperties = Array(
|
|||||||
$IBLOCK_PROPERTY_SKU = array();
|
$IBLOCK_PROPERTY_SKU = array();
|
||||||
$IBLOCK_PROPERTY_UNIT_SKU = array();
|
$IBLOCK_PROPERTY_UNIT_SKU = array();
|
||||||
foreach ($iblockProperties as $prop) {
|
foreach ($iblockProperties as $prop) {
|
||||||
|
|
||||||
$skuUnitProps = ('IBLOCK_PROPERTY_UNIT_SKU' . "_" . $prop);
|
$skuUnitProps = ('IBLOCK_PROPERTY_UNIT_SKU' . "_" . $prop);
|
||||||
$skuUnitProps = $$skuUnitProps;
|
$skuUnitProps = $$skuUnitProps;
|
||||||
if (is_array($skuUnitProps)) {
|
if (is_array($skuUnitProps)) {
|
||||||
@ -31,7 +31,7 @@ foreach ($iblockProperties as $prop) {
|
|||||||
$IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val;
|
$IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$skuProps = ('IBLOCK_PROPERTY_SKU' . "_" . $prop);
|
$skuProps = ('IBLOCK_PROPERTY_SKU' . "_" . $prop);
|
||||||
$skuProps = $$skuProps;
|
$skuProps = $$skuProps;
|
||||||
if (is_array($skuProps)) {
|
if (is_array($skuProps)) {
|
||||||
@ -43,7 +43,7 @@ foreach ($iblockProperties as $prop) {
|
|||||||
$IBLOCK_PROPERTY_PRODUCT = array();
|
$IBLOCK_PROPERTY_PRODUCT = array();
|
||||||
$IBLOCK_PROPERTY_UNIT_PRODUCT = array();
|
$IBLOCK_PROPERTY_UNIT_PRODUCT = array();
|
||||||
foreach ($iblockProperties as $prop) {
|
foreach ($iblockProperties as $prop) {
|
||||||
|
|
||||||
$productUnitProps = "IBLOCK_PROPERTY_UNIT_PRODUCT" . "_" . $prop;
|
$productUnitProps = "IBLOCK_PROPERTY_UNIT_PRODUCT" . "_" . $prop;
|
||||||
$productUnitProps = $$productUnitProps;
|
$productUnitProps = $$productUnitProps;
|
||||||
if (is_array($productUnitProps)) {
|
if (is_array($productUnitProps)) {
|
||||||
@ -51,7 +51,7 @@ foreach ($iblockProperties as $prop) {
|
|||||||
$IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock][$prop] = $val;
|
$IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock][$prop] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$productProps = "IBLOCK_PROPERTY_PRODUCT" . "_" . $prop;
|
$productProps = "IBLOCK_PROPERTY_PRODUCT" . "_" . $prop;
|
||||||
$productProps = $$productProps;
|
$productProps = $$productProps;
|
||||||
if (is_array($productProps)) {
|
if (is_array($productProps)) {
|
||||||
@ -70,4 +70,5 @@ $loader->propertiesProduct = $IBLOCK_PROPERTY_PRODUCT;
|
|||||||
$loader->propertiesUnitProduct = $IBLOCK_PROPERTY_UNIT_PRODUCT;
|
$loader->propertiesUnitProduct = $IBLOCK_PROPERTY_UNIT_PRODUCT;
|
||||||
$loader->filename = $SETUP_FILE_NAME;
|
$loader->filename = $SETUP_FILE_NAME;
|
||||||
$loader->application = $APPLICATION;
|
$loader->application = $APPLICATION;
|
||||||
|
$loader->loadPurchasePrice = $LOAD_PURCHASE_PRICE == 'Y';
|
||||||
$loader->Load();
|
$loader->Load();
|
@ -20,6 +20,8 @@ if (($ACTION == 'EXPORT' || $ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY'
|
|||||||
|
|
||||||
if (isset($arOldSetupVars['SETUP_FILE_NAME']))
|
if (isset($arOldSetupVars['SETUP_FILE_NAME']))
|
||||||
$SETUP_FILE_NAME = $arOldSetupVars['SETUP_FILE_NAME'];
|
$SETUP_FILE_NAME = $arOldSetupVars['SETUP_FILE_NAME'];
|
||||||
|
if (isset($arOldSetupVars['LOAD_PURCHASE_PRICE']))
|
||||||
|
$LOAD_PURCHASE_PRICE = $arOldSetupVars['LOAD_PURCHASE_PRICE'];
|
||||||
if (isset($arOldSetupVars['SETUP_PROFILE_NAME']))
|
if (isset($arOldSetupVars['SETUP_PROFILE_NAME']))
|
||||||
$SETUP_PROFILE_NAME = $arOldSetupVars['SETUP_PROFILE_NAME'];
|
$SETUP_PROFILE_NAME = $arOldSetupVars['SETUP_PROFILE_NAME'];
|
||||||
if (isset($arOldSetupVars['IBLOCK_EXPORT']))
|
if (isset($arOldSetupVars['IBLOCK_EXPORT']))
|
||||||
@ -35,8 +37,8 @@ if (($ACTION == 'EXPORT' || $ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY'
|
|||||||
$IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val;
|
$IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$IBLOCK_PROPERTY_PRODUCT = array();
|
$IBLOCK_PROPERTY_PRODUCT = array();
|
||||||
$IBLOCK_PROPERTY_UNIT_PRODUCT = array();
|
$IBLOCK_PROPERTY_UNIT_PRODUCT = array();
|
||||||
foreach ($iblockProperties as $prop) {
|
foreach ($iblockProperties as $prop) {
|
||||||
@ -96,7 +98,7 @@ if ($STEP==1)
|
|||||||
?><input type="hidden" name="PROFILE_ID" value="<? echo intval($PROFILE_ID); ?>"><?
|
?><input type="hidden" name="PROFILE_ID" value="<? echo intval($PROFILE_ID); ?>"><?
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h3><?=GetMessage("SETTINGS_INFOBLOCK");?></h3>
|
<h3><?=GetMessage("SETTINGS_INFOBLOCK");?></h3>
|
||||||
<font class="text"><?=GetMessage("EXPORT_CATALOGS");?><br><br></font>
|
<font class="text"><?=GetMessage("EXPORT_CATALOGS");?><br><br></font>
|
||||||
<?
|
<?
|
||||||
@ -104,7 +106,7 @@ if ($STEP==1)
|
|||||||
{
|
{
|
||||||
$IBLOCK_EXPORT = array();
|
$IBLOCK_EXPORT = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$iblockPropertiesName = Array(
|
$iblockPropertiesName = Array(
|
||||||
"article" => GetMessage("PROPERTY_ARTICLE_HEADER_NAME"),
|
"article" => GetMessage("PROPERTY_ARTICLE_HEADER_NAME"),
|
||||||
"manufacturer" => GetMessage("PROPERTY_MANUFACTURER_HEADER_NAME"),
|
"manufacturer" => GetMessage("PROPERTY_MANUFACTURER_HEADER_NAME"),
|
||||||
@ -115,15 +117,15 @@ if ($STEP==1)
|
|||||||
"width" => GetMessage("PROPERTY_WIDTH_HEADER_NAME"),
|
"width" => GetMessage("PROPERTY_WIDTH_HEADER_NAME"),
|
||||||
"height" => GetMessage("PROPERTY_HEIGHT_HEADER_NAME"),
|
"height" => GetMessage("PROPERTY_HEIGHT_HEADER_NAME"),
|
||||||
);
|
);
|
||||||
|
|
||||||
$iblockFieldsName = Array(
|
$iblockFieldsName = Array(
|
||||||
|
|
||||||
"weight" => Array("code" => "catalog_size" , "name" => GetMessage("SELECT_WEIGHT_PROPERTY_NAME"), 'unit' => 'mass'),
|
"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'),
|
"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'),
|
"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'),
|
"height" => Array("code" => "catalog_height" , "name" => GetMessage("SELECT_HEIGHT_PROPERTY_NAME"), 'unit' => 'length'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$iblockPropertiesHint = Array(
|
$iblockPropertiesHint = Array(
|
||||||
"article" => Array("ARTICLE", "ART", "ARTNUMBER", "ARTICUL", "ARTIKUL"),
|
"article" => Array("ARTICLE", "ART", "ARTNUMBER", "ARTICUL", "ARTIKUL"),
|
||||||
"manufacturer" => Array("MANUFACTURER", "PROISVODITEL", "PROISVOD", "PROISV"),
|
"manufacturer" => Array("MANUFACTURER", "PROISVODITEL", "PROISVOD", "PROISV"),
|
||||||
@ -134,7 +136,7 @@ if ($STEP==1)
|
|||||||
"width" => Array("WIDTH", "SHIRINA"),
|
"width" => Array("WIDTH", "SHIRINA"),
|
||||||
"height" => Array("HEIGHT", "VISOTA"),
|
"height" => Array("HEIGHT", "VISOTA"),
|
||||||
);
|
);
|
||||||
|
|
||||||
$units = Array(
|
$units = Array(
|
||||||
'length' => Array(
|
'length' => Array(
|
||||||
'mm' => GetMessage("UNIT_MEASUREMENT_MM"),
|
'mm' => GetMessage("UNIT_MEASUREMENT_MM"),
|
||||||
@ -147,18 +149,18 @@ if ($STEP==1)
|
|||||||
'kg' => GetMessage("UNIT_MEASUREMENT_KG"),
|
'kg' => GetMessage("UNIT_MEASUREMENT_KG"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$hintUnit = Array(
|
$hintUnit = Array(
|
||||||
'length' => 'mm',
|
'length' => 'mm',
|
||||||
'mass' => 'g'
|
'mass' => 'g'
|
||||||
);
|
);
|
||||||
|
|
||||||
$boolAll = false;
|
$boolAll = false;
|
||||||
$intCountChecked = 0;
|
$intCountChecked = 0;
|
||||||
$intCountAvailIBlock = 0;
|
$intCountAvailIBlock = 0;
|
||||||
$arIBlockList = array();
|
$arIBlockList = array();
|
||||||
$db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));
|
$db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));
|
||||||
|
|
||||||
while ($iblock = $db_res->Fetch())
|
while ($iblock = $db_res->Fetch())
|
||||||
{
|
{
|
||||||
if ($arCatalog = CCatalog::GetByIDExt($iblock["ID"]))
|
if ($arCatalog = CCatalog::GetByIDExt($iblock["ID"]))
|
||||||
@ -169,46 +171,46 @@ if ($STEP==1)
|
|||||||
if ($arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
|
if ($arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
|
||||||
{
|
{
|
||||||
$iblockOffer = CCatalogSKU::GetInfoByProductIBlock($iblock["ID"]);
|
$iblockOffer = CCatalogSKU::GetInfoByProductIBlock($iblock["ID"]);
|
||||||
|
|
||||||
$db_properties = CIBlock::GetProperties($iblockOffer['IBLOCK_ID'], Array());
|
$db_properties = CIBlock::GetProperties($iblockOffer['IBLOCK_ID'], Array());
|
||||||
while($prop = $db_properties->Fetch())
|
while($prop = $db_properties->Fetch())
|
||||||
$propertiesSKU[] = $prop;
|
$propertiesSKU[] = $prop;
|
||||||
|
|
||||||
$oldPropertySKU = null;
|
$oldPropertySKU = null;
|
||||||
if (isset($IBLOCK_PROPERTY_SKU[$iblock['ID']])) {
|
if (isset($IBLOCK_PROPERTY_SKU[$iblock['ID']])) {
|
||||||
foreach ($iblockPropertiesName as $key => $prop) {
|
foreach ($iblockPropertiesName as $key => $prop) {
|
||||||
$oldPropertySKU[$key] = $IBLOCK_PROPERTY_SKU[$iblock['ID']][$key];
|
$oldPropertySKU[$key] = $IBLOCK_PROPERTY_SKU[$iblock['ID']][$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldPropertyUnitSKU = null;
|
$oldPropertyUnitSKU = null;
|
||||||
if (isset($IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']])) {
|
if (isset($IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']])) {
|
||||||
foreach ($iblockPropertiesName as $key => $prop) {
|
foreach ($iblockPropertiesName as $key => $prop) {
|
||||||
$oldPropertyUnitSKU[$key] = $IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']][$key];
|
$oldPropertyUnitSKU[$key] = $IBLOCK_PROPERTY_UNIT_SKU[$iblock['ID']][$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$propertiesProduct = null;
|
$propertiesProduct = null;
|
||||||
$db_properties = CIBlock::GetProperties($iblock['ID'], Array());
|
$db_properties = CIBlock::GetProperties($iblock['ID'], Array());
|
||||||
while($prop = $db_properties->Fetch())
|
while($prop = $db_properties->Fetch())
|
||||||
$propertiesProduct[] = $prop;
|
$propertiesProduct[] = $prop;
|
||||||
|
|
||||||
$oldPropertyProduct = null;
|
$oldPropertyProduct = null;
|
||||||
if (isset($IBLOCK_PROPERTY_PRODUCT[$iblock['ID']])) {
|
if (isset($IBLOCK_PROPERTY_PRODUCT[$iblock['ID']])) {
|
||||||
foreach ($iblockPropertiesName as $key => $prop) {
|
foreach ($iblockPropertiesName as $key => $prop) {
|
||||||
$oldPropertyProduct[$key] = $IBLOCK_PROPERTY_PRODUCT[$iblock['ID']][$key];
|
$oldPropertyProduct[$key] = $IBLOCK_PROPERTY_PRODUCT[$iblock['ID']][$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldPropertyUnitProduct = null;
|
$oldPropertyUnitProduct = null;
|
||||||
if (isset($IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']])) {
|
if (isset($IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']])) {
|
||||||
foreach ($iblockPropertiesName as $key => $prop) {
|
foreach ($iblockPropertiesName as $key => $prop) {
|
||||||
$oldPropertyUnitProduct[$key] = $IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']][$key];
|
$oldPropertyUnitProduct[$key] = $IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock['ID']][$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$arSiteList = array();
|
$arSiteList = array();
|
||||||
$rsSites = CIBlock::GetSite($iblock["ID"]);
|
$rsSites = CIBlock::GetSite($iblock["ID"]);
|
||||||
while ($arSite = $rsSites->Fetch())
|
while ($arSite = $rsSites->Fetch())
|
||||||
@ -220,7 +222,7 @@ if ($STEP==1)
|
|||||||
$boolExport = (in_array($iblock['ID'], $IBLOCK_EXPORT));
|
$boolExport = (in_array($iblock['ID'], $IBLOCK_EXPORT));
|
||||||
else
|
else
|
||||||
$boolExport = true;
|
$boolExport = true;
|
||||||
|
|
||||||
|
|
||||||
$arIBlockList[] = array(
|
$arIBlockList[] = array(
|
||||||
'ID' => $iblock['ID'],
|
'ID' => $iblock['ID'],
|
||||||
@ -253,12 +255,12 @@ if ($STEP==1)
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<font class="text" style="font-weight: bold;"><?=GetMessage("CHECK_ALL_INFOBLOCKS");?></font>
|
<font class="text" style="font-weight: bold;"><?=GetMessage("CHECK_ALL_INFOBLOCKS");?></font>
|
||||||
<input
|
<input
|
||||||
style="vertical-align: middle;"
|
style="vertical-align: middle;"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="icml_export_all"
|
name="icml_export_all"
|
||||||
id="icml_export_all"
|
id="icml_export_all"
|
||||||
value="Y"
|
value="Y"
|
||||||
onclick="checkAll(this,<? echo $intCountAvailIBlock; ?>);"
|
onclick="checkAll(this,<? echo $intCountAvailIBlock; ?>);"
|
||||||
<? echo ($boolAll ? ' checked' : ''); ?>>
|
<? echo ($boolAll ? ' checked' : ''); ?>>
|
||||||
</br>
|
</br>
|
||||||
@ -283,7 +285,7 @@ if ($STEP==1)
|
|||||||
<table class="adm-list-table" id="export_setup" <?=($arIBlock['PROPERTIES_SKU'] == null ? 'style="width: 66%;"': "" )?> >
|
<table class="adm-list-table" id="export_setup" <?=($arIBlock['PROPERTIES_SKU'] == null ? 'style="width: 66%;"': "" )?> >
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="adm-list-table-header">
|
<tr class="adm-list-table-header">
|
||||||
<td class="adm-list-table-cell">
|
<td class="adm-list-table-cell">
|
||||||
<div class="adm-list-table-cell-inner"><?=GetMessage("LOADED_PROPERTY");?></div>
|
<div class="adm-list-table-cell-inner"><?=GetMessage("LOADED_PROPERTY");?></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="adm-list-table-cell">
|
<td class="adm-list-table-cell">
|
||||||
@ -297,16 +299,16 @@ if ($STEP==1)
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<? foreach ($iblockPropertiesName as $key => $property): ?>
|
<? foreach ($iblockPropertiesName as $key => $property): ?>
|
||||||
|
|
||||||
<? $productSelected = false;?>
|
<? $productSelected = false;?>
|
||||||
|
|
||||||
<tr class="adm-list-table-row">
|
<tr class="adm-list-table-row">
|
||||||
<td class="adm-list-table-cell">
|
<td class="adm-list-table-cell">
|
||||||
<? echo htmlspecialcharsex($property); ?>
|
<? echo htmlspecialcharsex($property); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="adm-list-table-cell">
|
<td class="adm-list-table-cell">
|
||||||
<select
|
<select
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
@ -338,7 +340,7 @@ if ($STEP==1)
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
>
|
>
|
||||||
|
|
||||||
<?=$field['name'];?>
|
<?=$field['name'];?>
|
||||||
</option>
|
</option>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
@ -373,9 +375,9 @@ if ($STEP==1)
|
|||||||
<?if (version_compare(SM_VERSION, '14.0.0', '>=') && array_key_exists($key, $iblockFieldsName)){?>
|
<?if (version_compare(SM_VERSION, '14.0.0', '>=') && array_key_exists($key, $iblockFieldsName)){?>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<?}?>
|
<?}?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<?if (array_key_exists($key, $iblockFieldsName)) :?>
|
<?if (array_key_exists($key, $iblockFieldsName)) :?>
|
||||||
<select
|
<select
|
||||||
style="width: 100px; margin-left: 50px;"
|
style="width: 100px; margin-left: 50px;"
|
||||||
@ -406,7 +408,7 @@ if ($STEP==1)
|
|||||||
</select>
|
</select>
|
||||||
<?endif; ?>
|
<?endif; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<? if ($arIBlock['PROPERTIES_SKU'] != null): ?>
|
<? if ($arIBlock['PROPERTIES_SKU'] != null): ?>
|
||||||
<td class="adm-list-table-cell">
|
<td class="adm-list-table-cell">
|
||||||
<select
|
<select
|
||||||
@ -423,7 +425,7 @@ if ($STEP==1)
|
|||||||
|
|
||||||
<? if ($keyField == $key) :?>
|
<? if ($keyField == $key) :?>
|
||||||
<option value="<?=$field['code'];?>"
|
<option value="<?=$field['code'];?>"
|
||||||
<?
|
<?
|
||||||
if (!$productSelected) {
|
if (!$productSelected) {
|
||||||
if ($arIBlock['OLD_PROPERTY_SKU_SELECT'] != null) {
|
if ($arIBlock['OLD_PROPERTY_SKU_SELECT'] != null) {
|
||||||
if ($field['code'] == $arIBlock['OLD_PROPERTY_SKU_SELECT'][$key] ) {
|
if ($field['code'] == $arIBlock['OLD_PROPERTY_SKU_SELECT'][$key] ) {
|
||||||
@ -440,7 +442,7 @@ if ($STEP==1)
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
>
|
>
|
||||||
|
|
||||||
<?=$field['name'];?>
|
<?=$field['name'];?>
|
||||||
</option>
|
</option>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
@ -476,7 +478,7 @@ if ($STEP==1)
|
|||||||
</optgroup>
|
</optgroup>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<?if (array_key_exists($key, $iblockFieldsName)) :?>
|
<?if (array_key_exists($key, $iblockFieldsName)) :?>
|
||||||
<select
|
<select
|
||||||
style="width: 100px; margin-left: 50px;"
|
style="width: 100px; margin-left: 50px;"
|
||||||
@ -507,10 +509,10 @@ if ($STEP==1)
|
|||||||
</select>
|
</select>
|
||||||
<?endif; ?>
|
<?endif; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<? endif;?>
|
<? endif;?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<? endforeach;?>
|
<? endforeach;?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -518,8 +520,8 @@ if ($STEP==1)
|
|||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<? endforeach;?>
|
<? endforeach;?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -527,7 +529,7 @@ if ($STEP==1)
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h3><?=GetMessage("SETTINGS_EXPORT");?></h3>
|
<h3><?=GetMessage("SETTINGS_EXPORT");?></h3>
|
||||||
|
|
||||||
<font class="text"><?=GetMessage("FILENAME");?><br><br></font>
|
<font class="text"><?=GetMessage("FILENAME");?><br><br></font>
|
||||||
<input type="text" name="SETUP_FILE_NAME"
|
<input type="text" name="SETUP_FILE_NAME"
|
||||||
value="<?=htmlspecialcharsbx(strlen($SETUP_FILE_NAME) > 0 ?
|
value="<?=htmlspecialcharsbx(strlen($SETUP_FILE_NAME) > 0 ?
|
||||||
@ -538,6 +540,11 @@ if ($STEP==1)
|
|||||||
'/bitrix/catalog_export/'))
|
'/bitrix/catalog_export/'))
|
||||||
.'intarocrm'/* .mt_rand(0, 999999) */.'.xml'
|
.'intarocrm'/* .mt_rand(0, 999999) */.'.xml'
|
||||||
); ?>" size="50">
|
); ?>" size="50">
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<font class="text"><?=GetMessage("LOAD_PURCHASE_PRICE");?> </font>
|
||||||
|
<input type="checkbox" name="LOAD_PURCHASE_PRICE" value="Y" <?= $LOAD_PURCHASE_PRICE == 'Y' ? 'checked' : '' ?>>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
@ -562,7 +569,7 @@ if ($STEP==1)
|
|||||||
function checkAll(obj,cnt)
|
function checkAll(obj,cnt)
|
||||||
{
|
{
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
if (obj.checked)
|
if (obj.checked)
|
||||||
BX.removeClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
BX.removeClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
||||||
}
|
}
|
||||||
@ -576,16 +583,16 @@ if ($STEP==1)
|
|||||||
transition : BX.easing.transitions.linear,
|
transition : BX.easing.transitions.linear,
|
||||||
step : function(state){
|
step : function(state){
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
BX('IBLOCK_EXPORT_TABLE'+(i+1)).style.opacity = state.opacity/100;
|
BX('IBLOCK_EXPORT_TABLE'+(i+1)).style.opacity = state.opacity/100;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete : function() {
|
complete : function() {
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
if (!obj.checked)
|
if (!obj.checked)
|
||||||
BX.addClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
BX.addClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
easing.animate();
|
easing.animate();
|
||||||
@ -611,7 +618,7 @@ if ($STEP==1)
|
|||||||
},
|
},
|
||||||
complete : function() {
|
complete : function() {
|
||||||
if (!obj.checked)
|
if (!obj.checked)
|
||||||
BX.addClass(table,"iblock-export-table-display-none");
|
BX.addClass(table,"iblock-export-table-display-none");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
easing.animate();
|
easing.animate();
|
||||||
@ -637,14 +644,14 @@ if ($STEP==1)
|
|||||||
<?=bitrix_sessid_post();?>
|
<?=bitrix_sessid_post();?>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
$vals = "SETUP_FILE_NAME,IBLOCK_EXPORT";
|
$vals = "LOAD_PURCHASE_PRICE,SETUP_FILE_NAME,IBLOCK_EXPORT";
|
||||||
foreach ($iblockProperties as $val) {
|
foreach ($iblockProperties as $val) {
|
||||||
$vals .= ",IBLOCK_PROPERTY_SKU_" . $val;
|
$vals .= ",IBLOCK_PROPERTY_SKU_" . $val;
|
||||||
$vals .= ",IBLOCK_PROPERTY_UNIT_SKU_" . $val;
|
$vals .= ",IBLOCK_PROPERTY_UNIT_SKU_" . $val;
|
||||||
$vals .= ",IBLOCK_PROPERTY_PRODUCT_" . $val;
|
$vals .= ",IBLOCK_PROPERTY_PRODUCT_" . $val;
|
||||||
$vals .= ",IBLOCK_PROPERTY_UNIT_PRODUCT_" . $val;
|
$vals .= ",IBLOCK_PROPERTY_UNIT_PRODUCT_" . $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="lang" value="<?echo LANGUAGE_ID ?>">
|
<input type="hidden" name="lang" value="<?echo LANGUAGE_ID ?>">
|
||||||
<input type="hidden" name="ACT_FILE" value="<?echo htmlspecialcharsbx($_REQUEST["ACT_FILE"]) ?>">
|
<input type="hidden" name="ACT_FILE" value="<?echo htmlspecialcharsbx($_REQUEST["ACT_FILE"]) ?>">
|
||||||
|
@ -5,6 +5,7 @@ $MESS["EXPORT_CATALOGS"] = "Выберите каталоги для выгру
|
|||||||
$MESS["CATALOG"] = "Каталог";
|
$MESS["CATALOG"] = "Каталог";
|
||||||
$MESS["EXPORT2INTAROCML"] = "Выгрузить в ICML";
|
$MESS["EXPORT2INTAROCML"] = "Выгрузить в ICML";
|
||||||
$MESS["FILENAME"] = "Укажите имя файла данных:";
|
$MESS["FILENAME"] = "Укажите имя файла данных:";
|
||||||
|
$MESS["LOAD_PURCHASE_PRICE"] = "Выгружать закупочную цену";
|
||||||
$MESS["PROPERTY"] = "Свойство, содержащее артикул товара";
|
$MESS["PROPERTY"] = "Свойство, содержащее артикул товара";
|
||||||
$MESS["ALL_CATALOG"] = "Все каталоги";
|
$MESS["ALL_CATALOG"] = "Все каталоги";
|
||||||
$MESS["CET_EXPORT"] = "Экспортировать";
|
$MESS["CET_EXPORT"] = "Экспортировать";
|
||||||
|
Loading…
Reference in New Issue
Block a user