Export to ICML has been modified
Added step4 into install
This commit is contained in:
parent
05bd2807fd
commit
14dce123c4
331
intaro.intarocrm/classes/general/ICMLLoader.php
Normal file
331
intaro.intarocrm/classes/general/ICMLLoader.php
Normal file
@ -0,0 +1,331 @@
|
||||
<?php
|
||||
|
||||
class ICMLLoader {
|
||||
|
||||
public $iblocks;
|
||||
public $filename;
|
||||
public $articleProperties;
|
||||
public $application;
|
||||
public $encoding = 'utf-8';
|
||||
|
||||
protected $fp;
|
||||
public static function AgentLoad3( $filename)
|
||||
{
|
||||
echo $filename;
|
||||
$arFilename = "'" . $filename . "'";
|
||||
return "ICMLLoader::AgentLoad( " . $arFilename . ");";
|
||||
|
||||
}
|
||||
public static function AgentLoad($iblocks, $filename)
|
||||
{
|
||||
|
||||
if (!CModule::IncludeModule("iblock")) {
|
||||
//handle err
|
||||
self::eventLog('ICMLLoader::AgentLoad', 'iblock', 'module not found');
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!CModule::IncludeModule("catalog")) {
|
||||
//handle err
|
||||
self::eventLog('ICMLLoader::AgentLoad', 'catalog', 'module not found');
|
||||
return true;
|
||||
}
|
||||
|
||||
global $APPLICATION, $USER;
|
||||
if(!isset($USER)) {
|
||||
$USER = new CUser;
|
||||
}
|
||||
$loader = new ICMLLoader();
|
||||
$loader->iblocks = json_decode($iblocks, true);
|
||||
$loader->filename = $filename;
|
||||
$loader->application = $APPLICATION;
|
||||
$loader->Load();
|
||||
$arIblocks = "'" . $iblocks . "'";
|
||||
$arFilename = "'" . $filename . "'";
|
||||
return "ICMLLoader::AgentLoad(" . $arIblocks . ", " . $arFilename . ");";
|
||||
}
|
||||
public function Load()
|
||||
{
|
||||
$categories = $this->GetCategories();
|
||||
|
||||
$offers = $this->GetOffers();
|
||||
|
||||
/*foreach ($offers as $obj)
|
||||
if (is_array($obj))
|
||||
foreach ($obj as $obj2)
|
||||
print(htmlspecialcharsbx($obj2) . "<br>");
|
||||
else
|
||||
print(htmlspecialcharsbx($obj) . "<br>");
|
||||
*/
|
||||
|
||||
|
||||
$this->PrepareFile();
|
||||
|
||||
$this->PreWriteCatalog();
|
||||
|
||||
$this->WriteCategories($categories);
|
||||
$this->WriteOffers($offers);
|
||||
|
||||
$this->PostWriteCatalog();
|
||||
|
||||
$this->CloseFile();
|
||||
|
||||
}
|
||||
|
||||
protected function PrepareValue($text)
|
||||
{
|
||||
|
||||
//$text = htmlspecialcharsbx($text);
|
||||
//$text = str_replace('"', '"', $text);
|
||||
//$text = preg_replace("/[\x1-\x8\xB-\xC\xE-\x1F]/", "", $text);
|
||||
//$text = str_replace("'", "'", $text);
|
||||
$text = $this->application->ConvertCharset($text, LANG_CHARSET, $this->encoding);
|
||||
return $text;
|
||||
}
|
||||
|
||||
protected function PrepareFile()
|
||||
{
|
||||
$fullFilename = $_SERVER["DOCUMENT_ROOT"] . $this->filename;
|
||||
CheckDirPath($fullFilename);
|
||||
|
||||
if (!$this->fp = @fopen($fullFilename, "w"))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function PreWriteCatalog()
|
||||
{
|
||||
@fwrite($this->fp, "<yml_catalog date=\"".Date("Y-m-d H:i:s")."\">\n");
|
||||
@fwrite($this->fp, "<shop>\n");
|
||||
|
||||
@fwrite($this->fp, "<name>".$this->application->ConvertCharset(htmlspecialcharsbx(COption::GetOptionString("main", "site_name", "")), LANG_CHARSET, $encoding)."</name>\n");
|
||||
|
||||
@fwrite($this->fp, "<company>".$this->application->ConvertCharset(htmlspecialcharsbx(COption::GetOptionString("main", "site_name", "")), LANG_CHARSET, $encoding)."</company>\n");
|
||||
|
||||
}
|
||||
|
||||
protected function WriteCategories($categories)
|
||||
{
|
||||
@fwrite($this->fp, "<categories>\n");
|
||||
foreach ($categories as $category) {
|
||||
@fwrite($this->fp, $category . "\n");
|
||||
}
|
||||
@fwrite($this->fp, "</categories>\n");
|
||||
}
|
||||
protected function WriteOffers($offers)
|
||||
{
|
||||
@fwrite($this->fp, "<offers>\n");
|
||||
foreach ($offers as $offer) {
|
||||
@fwrite($this->fp, $offer . "\n");
|
||||
}
|
||||
@fwrite($this->fp, "</offers>\n");
|
||||
}
|
||||
|
||||
protected function PostWriteCatalog()
|
||||
{
|
||||
@fwrite($this->fp, "</shop>\n");
|
||||
@fwrite($this->fp, "</yml_catalog>\n");
|
||||
}
|
||||
|
||||
protected function CloseFile()
|
||||
{
|
||||
@fclose($this->fp);
|
||||
}
|
||||
|
||||
|
||||
protected function GetCategories()
|
||||
{
|
||||
$categories = array();
|
||||
foreach ($this->iblocks as $id)
|
||||
{
|
||||
$filter = Array(
|
||||
"IBLOCK_ID" => $id,
|
||||
"ACTIVE" => "Y",
|
||||
"IBLOCK_ACTIVE" => "Y",
|
||||
"GLOBAL_ACTIVE" => "Y"
|
||||
);
|
||||
|
||||
|
||||
$dbRes = CIBlockSection::GetList(array("left_margin" => "asc"), $filter);
|
||||
while ($arRes = $dbRes->Fetch())
|
||||
{
|
||||
$categories[] = $this->BuildCategory($arRes);
|
||||
}
|
||||
}
|
||||
return $categories;
|
||||
|
||||
}
|
||||
|
||||
protected function BuildCategory($arCategory)
|
||||
{
|
||||
return "
|
||||
<category id=\"" . $arCategory["ID"] . "\""
|
||||
. ( intval($arCategory["IBLOCK_SECTION_ID"] ) > 0 ?
|
||||
" parentId=\"" . $arCategory["IBLOCK_SECTION_ID"] . "\""
|
||||
:"")
|
||||
. ">"
|
||||
. $arCategory["NAME"]
|
||||
. "</category>";
|
||||
|
||||
}
|
||||
|
||||
protected function GetOffers()
|
||||
{
|
||||
$offers = Array();
|
||||
foreach ($this->iblocks as $key => $id)
|
||||
{
|
||||
|
||||
$iblock['IBLOCK_DB'] = CIBlock::GetByID($id)->Fetch();
|
||||
$iblockOffer = CCatalogSKU::GetInfoByProductIBlock($id);
|
||||
|
||||
|
||||
$arSelect = Array (
|
||||
"ID",
|
||||
"LID",
|
||||
"IBLOCK_ID",
|
||||
"IBLOCK_SECTION_ID",
|
||||
"ACTIVE",
|
||||
"ACTIVE_FROM",
|
||||
"ACTIVE_TO",
|
||||
"NAME",
|
||||
"DETAIL_PICTURE",
|
||||
"DETAIL_TEXT",
|
||||
"DETAIL_PICTURE",
|
||||
"LANG_DIR",
|
||||
"DETAIL_PAGE_URL",
|
||||
"PROPERTY_" . $this->articleProperties[$key]
|
||||
);
|
||||
|
||||
$filter = Array (
|
||||
"IBLOCK_ID" => $id,
|
||||
"ACTIVE_DATE" => "Y",
|
||||
"ACTIVE" => "Y",
|
||||
"INCLUDE_SUBSECTIONS" => "Y"
|
||||
);
|
||||
$counter = 0;
|
||||
$dbResProducts = CIBlockElement::GetList(array(), $filter, false, false, $arSelect);
|
||||
while ($product = $dbResProducts->GetNextElement()) {
|
||||
|
||||
$product = $product->GetFields();
|
||||
|
||||
$categoriesString = "";
|
||||
|
||||
|
||||
$existOffer = false;
|
||||
if (!empty($iblockOffer['IBLOCK_ID'])) {
|
||||
$arFilterOffer = Array (
|
||||
'IBLOCK_ID' => $iblockOffer['IBLOCK_ID'],
|
||||
'PROPERTY_'.$iblockOffer['SKU_PROPERTY_ID'] => $product["ID"]
|
||||
);
|
||||
$arSelectOffer = Array (
|
||||
'ID',
|
||||
"NAME",
|
||||
"DETAIL_TEXT",
|
||||
"DETAIL_PAGE_URL",
|
||||
"DETAIL_PICTURE",
|
||||
"PROPERTY_" . $this->articleProperties[$key]
|
||||
);
|
||||
|
||||
$rsOffers = CIBlockElement::GetList(array(), $arFilterOffer, false, false, $arSelectOffer);
|
||||
while ($arOffer = $rsOffers->GetNext()) {
|
||||
|
||||
$dbResCategories = CIBlockElement::GetElementGroups($arOffer['ID'], true);
|
||||
while ($arResCategory = $dbResCategories->Fetch()) {
|
||||
$categoriesString .= "<categoryId>" . $arResCategory["ID"] . "</categoryId>\n";
|
||||
}
|
||||
$offer = CCatalogProduct::GetByID($arOffer['ID']);
|
||||
$arOffer['QUANTITY'] = $offer["QUANTITY"];
|
||||
|
||||
$arOffer['PRODUCT_ID'] = $product["ID"];
|
||||
$arOffer['DETAIL_PAGE_URL'] = $product["DETAIL_PAGE_URL"];
|
||||
$arOffer['DETAIL_PICTURE'] = $product["DETAIL_PICTURE"];
|
||||
$arOffer['PREVIEW_PICTURE'] = $product["PREVIEW_PICTURE"];
|
||||
$arOffer['PRODUCT_NAME'] = $product["NAME"];
|
||||
$arOffer['ARTICLE'] = $arOffer["PROPERTY_" . $this->articleProperties[$key] . "_VALUE"];
|
||||
|
||||
$dbPrice = GetCatalogProductPrice($arOffer["ID"],1);
|
||||
$arOffer['PRICE'] = $dbPrice['PRICE'];
|
||||
|
||||
|
||||
|
||||
$offers[] = $this->BuildOffer($arOffer, $categoriesString, $iblock);
|
||||
$existOffer = true;
|
||||
}
|
||||
}
|
||||
if (!$existOffer) {
|
||||
$dbResCategories = CIBlockElement::GetElementGroups($product["ID"], true);
|
||||
while ($arResCategory = $dbResCategories->Fetch()) {
|
||||
$categoriesString .= "<categoryId>" . $arResCategory["ID"] . "</categoryId>\n";
|
||||
}
|
||||
|
||||
|
||||
$offer = CCatalogProduct::GetByID($product['ID']);
|
||||
$product['QUANTITY'] = $offer["QUANTITY"];
|
||||
|
||||
$product['PRODUCT_ID'] = $product["ID"];
|
||||
$product['PRODUCT_NAME'] = $product["NAME"];
|
||||
$product['ARTICLE'] = $product["PROPERTY_" . $this->articleProperties[$key] . "_VALUE"];
|
||||
|
||||
$dbPrice = GetCatalogProductPrice($product["ID"],1);
|
||||
$product['PRICE'] = $dbPrice['PRICE'];
|
||||
|
||||
$offers[] = $this->BuildOffer($product, $categoriesString, $iblock);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $offers;
|
||||
}
|
||||
|
||||
|
||||
protected function BuildOffer($arOffer, $categoriesString, $iblock)
|
||||
{
|
||||
$offer = "";
|
||||
$offer .= "<offer
|
||||
id=\"" . $arOffer["ID"] . "\"
|
||||
productId=\"" . $arOffer["PRODUCT_ID"] . "\"
|
||||
quantity=\"" . DoubleVal($arOffer['QUANTITY']) . "\"
|
||||
>\n";
|
||||
$offer .= "<url>http://" . $iblock['IBLOCK_DB']['SERVER_NAME'] . $arOffer['DETAIL_PAGE_URL'] . "</url>\n";
|
||||
|
||||
$offer .= "<price>" . $arOffer['PRICE'] . "</price>\n";
|
||||
$offer .= $categoriesString;
|
||||
|
||||
$detailPicture = intval($arOffer["DETAIL_PICTURE"]);
|
||||
$previewPicture = intval($arOffer["PREVIEW_PICTURE"]);
|
||||
|
||||
if ($detailPicture > 0 || $previewPicture > 0)
|
||||
{
|
||||
$picture = $detailPicture;
|
||||
if ($picture <= 0) {
|
||||
$picture = $previewPicture;
|
||||
}
|
||||
|
||||
if ($arFile = CFile::GetFileArray($picture))
|
||||
{
|
||||
if(substr($arFile["SRC"], 0, 1) == "/")
|
||||
$strFile = "http://" . $iblock['IBLOCK_DB']['SERVER_NAME'] . implode("/", array_map("rawurlencode", explode("/", $arFile["SRC"])));
|
||||
elseif(preg_match("/^(http|https):\\/\\/(.*?)\\/(.*)\$/", $arFile["SRC"], $match))
|
||||
$strFile = "http://" . $match[2] . '/' . implode("/", array_map("rawurlencode", explode("/", $match[3])));
|
||||
else
|
||||
$strFile = $arFile["SRC"];
|
||||
$offer .= "<picture>" . $strFile . "</picture>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$offer .= "<name>" . $this->PrepareValue($arOffer["NAME"]) . "</name>\n";
|
||||
$offer .= "<description>" . (strip_tags( html_entity_decode(str_replace(" ", ' ', $this->PrepareValue($arOffer["DETAIL_TEXT"]))))) .
|
||||
"</description>\n";
|
||||
|
||||
|
||||
$offer .= "<xmlId>" . $arOffer["EXTERNAL_ID"] . "</xmlId>\n";
|
||||
$offer .= "<productName>" . $arOffer["PRODUCT_NAME"] . "</productName>\n";
|
||||
$offer .= "<article>" . $arOffer["ARTICLE"] . "</article>\n";
|
||||
|
||||
$offer.= "</offer>\n";
|
||||
return $offer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ CModule::AddAutoloadClasses(
|
||||
array (
|
||||
'IntaroCrm\RestApi' => 'classes/general/RestApi.php',
|
||||
'ICrmOrderActions' => 'classes/general/ICrmOrderActions.php',
|
||||
'ICMLLoader' => 'classes/general/ICMLLoader.php',
|
||||
'ICrmOrderEvent' => 'classes/general/events/ICrmOrderEvent.php'
|
||||
)
|
||||
);
|
@ -21,6 +21,7 @@ class intaro_intarocrm extends CModule
|
||||
var $PARTNER_NAME;
|
||||
var $PARTNER_URI;
|
||||
var $INTARO_CRM_API;
|
||||
var $INTARO_CRM_EXPORT = 'intarocrm';
|
||||
|
||||
var $CRM_API_HOST_OPTION = 'api_host';
|
||||
var $CRM_API_KEY_OPTION = 'api_key';
|
||||
@ -65,6 +66,7 @@ class intaro_intarocrm extends CModule
|
||||
|
||||
include($this->INSTALL_PATH . '/../classes/general/RestApi.php');
|
||||
include($this->INSTALL_PATH . '/../classes/general/ICrmOrderActions.php');
|
||||
include($this->INSTALL_PATH . '/../classes/general/ICMLLoader.php');
|
||||
|
||||
$step = intval($_REQUEST['step']);
|
||||
|
||||
@ -370,11 +372,193 @@ class intaro_intarocrm extends CModule
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step3.php'
|
||||
);
|
||||
} else if ($step == 4) {
|
||||
|
||||
if(!CModule::IncludeModule("iblock")) {
|
||||
$arResult['errCode'] = 'ERR_IBLOCK';
|
||||
}
|
||||
|
||||
if(!CModule::IncludeModule("catalog")) {
|
||||
$arResult['errCode'] = 'ERR_CATALOG';
|
||||
}
|
||||
$APPLICATION->IncludeAdminFile(
|
||||
GetMessage('MODULE_INSTALL_TITLE'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
|
||||
);
|
||||
} else if ($step == 5) {
|
||||
|
||||
if(isset($arResult['errCode']) && $arResult['errCode']) {
|
||||
$APPLICATION->IncludeAdminFile(
|
||||
GetMessage('MODULE_INSTALL_TITLE'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($_POST['back']) && $_POST['back']) {
|
||||
$APPLICATION->IncludeAdminFile(
|
||||
GetMessage('MODULE_INSTALL_TITLE'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step3.php'
|
||||
);
|
||||
}
|
||||
|
||||
RegisterModule($this->MODULE_ID);
|
||||
RegisterModuleDependences("sale", "OnSaleCancelOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSaleCancelOrder");
|
||||
|
||||
if(!CModule::IncludeModule("iblock")) {
|
||||
$arResult['errCode'] = 'ERR_IBLOCK';
|
||||
}
|
||||
|
||||
if(!CModule::IncludeModule("catalog")) {
|
||||
$arResult['errCode'] = 'ERR_CATALOG';
|
||||
}
|
||||
|
||||
if(!isset($_POST['IBLOCK_EXPORT']))
|
||||
$iblocks = 0;
|
||||
else
|
||||
$iblocks = $_POST['IBLOCK_EXPORT'];
|
||||
|
||||
if(!isset($_POST['IBLOCK_PROPERTY_ARTICLE']))
|
||||
$articleProperties = 0;
|
||||
else
|
||||
$articleProperties = $_POST['IBLOCK_PROPERTY_ARTICLE'];
|
||||
|
||||
if(!isset($_POST['SETUP_PROFILE_NAME']))
|
||||
$profileName = 0;
|
||||
else
|
||||
$profileName = $_POST['SETUP_PROFILE_NAME'];
|
||||
|
||||
if(!isset($_POST['SETUP_FILE_NAME']))
|
||||
$filename = 0;
|
||||
else
|
||||
$filename = $_POST['SETUP_FILE_NAME'];
|
||||
|
||||
if(!isset($_POST['TYPE_LOADING']))
|
||||
$typeLoading = 0;
|
||||
else
|
||||
$typeLoading = $_POST['TYPE_LOADING'];
|
||||
|
||||
if (isset($_POST['LOAD_NOW'])) {
|
||||
|
||||
$loader = new ICMLLoader();
|
||||
$loader->iblocks = $iblocks;
|
||||
$loader->articleProperties = $articleProperties;
|
||||
$loader->filename = $filename;
|
||||
$loader->application = $APPLICATION;
|
||||
$loader->Load();
|
||||
|
||||
}
|
||||
if(!isset($_POST['TYPE_LOADING']))
|
||||
$typeLoading = 0;
|
||||
else
|
||||
$typeLoading = $_POST['TYPE_LOADING'];
|
||||
|
||||
if ($typeLoading == 'agent' || $typeLoading == 'cron') {
|
||||
$dbProfile = CCatalogExport::GetList(array(), array("FILE_NAME" => $this->INTARO_CRM_EXPORT));
|
||||
|
||||
while ($arProfile = $dbProfile->Fetch()) {
|
||||
if ($arProfile["DEFAULT_PROFILE"]!="Y")
|
||||
CAgent::RemoveAgent("CCatalogExport::PreGenerateExport(".$arProfile['ID'].");", "catalog");
|
||||
}
|
||||
$ar = $this->GetProfileSetupVars($iblocks, $articleProperties, $filename);
|
||||
$PROFILE_ID = CCatalogExport::Add(array(
|
||||
"LAST_USE" => false,
|
||||
"FILE_NAME" => $this->INTARO_CRM_EXPORT,
|
||||
"NAME" => $profileName,
|
||||
"DEFAULT_PROFILE" => "N",
|
||||
"IN_MENU" => "N",
|
||||
"IN_AGENT" => "N",
|
||||
"IN_CRON" => "N",
|
||||
"NEED_EDIT" => "N",
|
||||
"SETUP_VARS" => $ar
|
||||
));
|
||||
if (intval($PROFILE_ID) <= 0) {
|
||||
$arResult['errCode'] = 'ERR_IBLOCK';
|
||||
return;
|
||||
}
|
||||
if ($typeLoading == 'agent') {
|
||||
|
||||
$dateAgent = new DateTime();
|
||||
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
||||
$dateAgent->add($intAgent);
|
||||
CAgent::AddAgent(
|
||||
"CCatalogExport::PreGenerateExport(" . $PROFILE_ID . ");",
|
||||
"catalog",
|
||||
"N",
|
||||
86400,
|
||||
$dateAgent->format('d.m.Y H:i:s'), // date of first check
|
||||
"Y", // агент активен
|
||||
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
||||
30
|
||||
);
|
||||
|
||||
CCatalogExport::Update($PROFILE_ID, array(
|
||||
"IN_CRON" => ($arProfile["IN_AGENT"]=="Y" ? "N" : "Y")
|
||||
));
|
||||
} else {
|
||||
$agent_period = 24;
|
||||
$agent_php_path = "/usr/local/php/bin/php";
|
||||
|
||||
if (!file_exists($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."cron_frame.php"))
|
||||
{
|
||||
CheckDirPath($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS);
|
||||
$tmp_file_size = filesize($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS_DEF."cron_frame.php");
|
||||
$fp = fopen($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS_DEF."cron_frame.php", "rb");
|
||||
$tmp_data = fread($fp, $tmp_file_size);
|
||||
fclose($fp);
|
||||
|
||||
$tmp_data = str_replace("#DOCUMENT_ROOT#", $_SERVER["DOCUMENT_ROOT"], $tmp_data);
|
||||
$tmp_data = str_replace("#PHP_PATH#", $agent_php_path, $tmp_data);
|
||||
|
||||
$fp = fopen($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."cron_frame.php", "ab");
|
||||
fwrite($fp, $tmp_data);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$cfg_data = "";
|
||||
if (file_exists($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg"))
|
||||
{
|
||||
$cfg_file_size = filesize($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg");
|
||||
$fp = fopen($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg", "rb");
|
||||
$cfg_data = fread($fp, $cfg_file_size);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
CheckDirPath($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."logs/");
|
||||
|
||||
if ($arProfile["IN_CRON"]=="Y")
|
||||
{
|
||||
// remove
|
||||
$cfg_data = preg_replace("#^.*?".preg_quote(CATALOG_PATH2EXPORTS)."cron_frame.php +".$PROFILE_ID." *>.*?$#im", "", $cfg_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$strTime = "0 */".$agent_period." * * * ";
|
||||
if (strlen($cfg_data)>0)
|
||||
$cfg_data .= "\n";
|
||||
|
||||
$cfg_data .= $strTime.$agent_php_path." -f ".$_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."cron_frame.php ".$PROFILE_ID." >".$_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."logs/".$PROFILE_ID.".txt\n";
|
||||
}
|
||||
|
||||
CCatalogExport::Update($PROFILE_ID, array(
|
||||
"IN_CRON" => ($arProfile["IN_CRON"]=="Y" ? "N" : "Y")
|
||||
));
|
||||
|
||||
CheckDirPath($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/");
|
||||
$cfg_data = preg_replace("#[\r\n]{2,}#im", "\n", $cfg_data);
|
||||
$fp = fopen($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg", "wb");
|
||||
fwrite($fp, $cfg_data);
|
||||
fclose($fp);
|
||||
|
||||
$arRetval = array();
|
||||
@exec("crontab ".$_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg", $arRetval, $return_var);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//agent
|
||||
|
||||
$dateAgent = new DateTime();
|
||||
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
||||
$dateAgent->add($intAgent);
|
||||
@ -391,16 +575,10 @@ class intaro_intarocrm extends CModule
|
||||
);
|
||||
|
||||
$this->CopyFiles();
|
||||
|
||||
// statistic update
|
||||
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
||||
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
||||
$this->INTARO_CRM_API = new \IntaroCrm\RestApi($api_host, $api_key);
|
||||
$this->INTARO_CRM_API->statisticUpdate();
|
||||
|
||||
|
||||
$APPLICATION->IncludeAdminFile(
|
||||
GetMessage('MODULE_INSTALL_TITLE'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step5.php'
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -417,10 +595,9 @@ class intaro_intarocrm extends CModule
|
||||
COption::RemoveOption($this->MODULE_ID, $this->CRM_PAYMENT_STATUSES);
|
||||
COption::RemoveOption($this->MODULE_ID, $this->CRM_PAYMENT);
|
||||
COption::RemoveOption($this->MODULE_ID, $this->CRM_ORDER_LAST_ID);
|
||||
UnRegisterModuleDependences("sale", "OnSaleCancelOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSaleCancelOrder");
|
||||
|
||||
|
||||
$this->DeleteFiles();
|
||||
|
||||
|
||||
UnRegisterModule($this->MODULE_ID);
|
||||
|
||||
$APPLICATION->IncludeAdminFile(
|
||||
@ -442,4 +619,23 @@ class intaro_intarocrm extends CModule
|
||||
unlink($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/include/catalog_export/intarocrm_run.php');
|
||||
unlink($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/include/catalog_export/intarocrm_setup.php');
|
||||
}
|
||||
}
|
||||
|
||||
function GetProfileSetupVars($iblocks, $articleProperties, $filename) {
|
||||
// Get string like IBLOCK_EXPORT[0]=3&
|
||||
// IBLOCK_EXPORT[1]=6&
|
||||
// IBLOCK_PROPERTY_ARTICLE[0]=ARTICLE&
|
||||
// IBLOCK_PROPERTY_ARTICLE[1]=ARTNUMBER&
|
||||
// SETUP_FILE_NAME=%2Fbitrix%2Fcatalog_export%2Ftestintarocrm.xml
|
||||
|
||||
//$arProfileFields = explode(",", $SETUP_FIELDS_LIST);
|
||||
$strVars = "";
|
||||
foreach ($iblocks as $key => $val)
|
||||
$strVars .= 'IBLOCK_EXPORT[' . $key . ']=' . $val . '&';
|
||||
foreach ($articleProperties as $key => $val)
|
||||
$strVars .= 'IBLOCK_PROPERTY_ARTICLE[' . $key . ']=' . $val . '&';
|
||||
|
||||
$strVars .= 'SETUP_FILE_NAME=' . urlencode($filename);
|
||||
|
||||
return $strVars;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,228 @@
|
||||
<?php
|
||||
if(!check_bitrix_sessid()) return;
|
||||
echo CAdminMessage::ShowNote(GetMessage("MOD_INST_OK")); ?>
|
||||
|
||||
<form action="<?php echo $APPLICATION->GetCurPage(); ?>">
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="submit" name="" value="<?php echo GetMessage("MOD_BACK"); ?>">
|
||||
<form>
|
||||
if(!check_bitrix_sessid()) return;
|
||||
IncludeModuleLangFile(__FILE__);
|
||||
__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/icml_export_setup.php"));
|
||||
|
||||
?>
|
||||
<form method="post" action="<?php echo $APPLICATION->GetCurPage(); ?>" >
|
||||
<font class="text"><?=GetMessage("EXPORT_CATALOGS");?><br><br></font>
|
||||
<?
|
||||
if (!isset($IBLOCK_EXPORT) || !is_array($IBLOCK_EXPORT))
|
||||
{
|
||||
$IBLOCK_EXPORT = array();
|
||||
}
|
||||
|
||||
$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 ($res = $db_res->Fetch())
|
||||
{
|
||||
if ($arCatalog = CCatalog::GetByIDExt($res["ID"]))
|
||||
{
|
||||
if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
|
||||
{
|
||||
$arSiteList = array();
|
||||
$rsSites = CIBlock::GetSite($res["ID"]);
|
||||
while ($arSite = $rsSites->Fetch())
|
||||
{
|
||||
$arSiteList[] = $arSite["SITE_ID"];
|
||||
}
|
||||
$db_properties = CIBlock::GetProperties($res['ID'], Array());
|
||||
|
||||
$properties = Array();
|
||||
while($prop = $db_properties->Fetch())
|
||||
$properties[] = $prop;
|
||||
|
||||
|
||||
$boolExport = (in_array($res['ID'],$IBLOCK_EXPORT));
|
||||
$arIBlockList[] = array(
|
||||
'ID' => $res['ID'],
|
||||
'NAME' => $res['NAME'],
|
||||
'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'],
|
||||
'IBLOCK_EXPORT' => $boolExport,
|
||||
'PROPERTIES' => $properties,
|
||||
'SITE_LIST' => '('.implode(' ',$arSiteList).')',
|
||||
);
|
||||
|
||||
if ($boolExport)
|
||||
$intCountChecked++;
|
||||
$intCountAvailIBlock++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($intCountChecked == $intCountAvailIBlock)
|
||||
$boolAll = true;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<table class="adm-list-table" id="export_setup">
|
||||
<thead>
|
||||
<tr class="adm-list-table-header">
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("CATALOG");?></div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner">
|
||||
<?echo GetMessage("EXPORT2INTAROCML");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<div class="adm-list-table-cell-inner"><?echo GetMessage("PROPERTY");?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell">
|
||||
<?echo GetMessage("ALL_CATALOG");?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<input style="vertical-align: middle;" type="checkbox" name="icml_export_all" id="icml_export_all" value="Y" onclick="checkAll(this,<? echo $intCountAvailIBlock; ?>);"<? echo ($boolAll ? ' checked' : ''); ?>>
|
||||
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
foreach ($arIBlockList as $key => $arIBlock)
|
||||
{
|
||||
?>
|
||||
<tr class="adm-list-table-row">
|
||||
<td class="adm-list-table-cell" style="padding-left: 5em">
|
||||
<? echo htmlspecialcharsex("[".$arIBlock["IBLOCK_TYPE_ID"]."] ".$arIBlock["NAME"]." ".$arIBlock['SITE_LIST']); ?>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<font class="tablebodytext">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="IBLOCK_EXPORT[<?=$key?>]"
|
||||
id="IBLOCK_EXPORT<?=$key?>"
|
||||
value="<?=$arIBlock["ID"]?>"
|
||||
<? if ($arIBlock['IBLOCK_EXPORT']) echo " checked"; ?>
|
||||
onclick="checkOne(this,<? echo $intCountAvailIBlock; ?>);"
|
||||
>
|
||||
</font>
|
||||
</td>
|
||||
<td class="adm-list-table-cell">
|
||||
<select style="width: 200px;" name="IBLOCK_PROPERTY_ARTICLE[<?=$key?>]" class="property-export">
|
||||
<?
|
||||
foreach ($arIBlock['PROPERTIES'] as $prop)
|
||||
{
|
||||
?>
|
||||
<option value="<?=$prop['CODE'] ?>"
|
||||
<?if ($prop["CODE"] == "ARTICLE" ||
|
||||
$prop["CODE"] == "ART" ||
|
||||
$prop["CODE"] == "ARTNUMBER" )
|
||||
echo " selected";?>
|
||||
>
|
||||
<?=$prop["NAME"];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="count_checked" id="count_checked" value="<? echo $intCountChecked; ?>">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<font class="text"><?=GetMessage("FILENAME");?><br><br></font>
|
||||
<input type="text" name="SETUP_FILE_NAME"
|
||||
value="<?=htmlspecialcharsbx(strlen($SETUP_FILE_NAME) > 0 ?
|
||||
$SETUP_FILE_NAME :
|
||||
(COption::GetOptionString(
|
||||
'catalog',
|
||||
'export_default_path',
|
||||
'/bitrix/catalog_export/'))
|
||||
.'testintarocrm'/* .mt_rand(0, 999999) */.'.xml'
|
||||
); ?>" size="50">
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<font class="text"><?=GetMessage("LOAD_PERIOD");?><br><br></font>
|
||||
<input type="radio" name="TYPE_LOADING" value="none" checked onclick="checkProfile(this);"><?=GetMessage("NOT_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="cron" onclick="checkProfile(this);"><?=GetMessage("CRON_LOADING");?><Br>
|
||||
<input type="radio" name="TYPE_LOADING" value="agent" onclick="checkProfile(this);"><?=GetMessage("AGENT_LOADING");?><Br>
|
||||
<br>
|
||||
<br>
|
||||
<font class="text"><?=GetMessage("LOAD_NOW");?> </font>
|
||||
<input id="load-now" type="checkbox" name="LOAD_NOW" value="now">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div id="profile-field" style="display: none">
|
||||
<font class="text"><?=GetMessage("PROFILE_NAME");?> </font>
|
||||
<input
|
||||
type="text"
|
||||
name="SETUP_PROFILE_NAME"
|
||||
value="<?echo htmlspecialchars($SETUP_PROFILE_NAME)?>"
|
||||
size="30">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function checkAll(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
for (i = 0; i < cnt; i++)
|
||||
{
|
||||
BX('IBLOCK_EXPORT'+i).checked = boolCheck;
|
||||
}
|
||||
BX('count_checked').value = (boolCheck ? cnt : 0);
|
||||
};
|
||||
function checkOne(obj,cnt)
|
||||
{
|
||||
var boolCheck = obj.checked;
|
||||
var intCurrent = parseInt(BX('count_checked').value);
|
||||
intCurrent += (boolCheck ? 1 : -1);
|
||||
BX('icml_export_all').checked = (intCurrent < cnt ? false : true);
|
||||
BX('count_checked').value = intCurrent;
|
||||
};
|
||||
function checkProfile(obj)
|
||||
{
|
||||
if (obj.value !== 'none')
|
||||
$('#profile-field').show();
|
||||
else
|
||||
$('#profile-field').hide();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<?//Следующие переменные должны быть обязательно установлены?>
|
||||
<?=bitrix_sessid_post();?>
|
||||
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="hidden" name="step" value="5">
|
||||
<input type="hidden" name="continue" value="4">
|
||||
<div style="padding: 1px 13px 2px; height:28px;">
|
||||
<div align="right" style="float:right; width:50%; position:relative;">
|
||||
<input type="submit" name="inst" value="<?php echo GetMessage("MOD_NEXT_STEP"); ?>" class="adm-btn-save">
|
||||
</div>
|
||||
<div align="left" style="float:right; width:50%; position:relative;">
|
||||
<input type="submit" name="back" value="<?php echo GetMessage("MOD_PREV_STEP"); ?>" class="adm-btn-save">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
10
intaro.intarocrm/install/step5.php
Normal file
10
intaro.intarocrm/install/step5.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if(!check_bitrix_sessid()) return;
|
||||
echo CAdminMessage::ShowNote(GetMessage("MOD_INST_OK")); ?>
|
||||
|
||||
<form action="<?php echo $APPLICATION->GetCurPage(); ?>">
|
||||
<input type="hidden" name="lang" value="<?php echo LANG; ?>">
|
||||
<input type="hidden" name="id" value="intaro.intarocrm">
|
||||
<input type="hidden" name="install" value="Y">
|
||||
<input type="submit" name="" value="<?php echo GetMessage("MOD_BACK"); ?>">
|
||||
<form>
|
109
intaro.intarocrm/lang/export_crm.php
Normal file
109
intaro.intarocrm/lang/export_crm.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
$MESS["YANDEX_DETAIL_TITLE"] = "Настройка дополнительных параметров";
|
||||
$MESS["YANDEX_ERR_NO_ACCESS_EXPORT"] = "Нет доступа к управлению экспортом";
|
||||
$MESS["YANDEX_ERR_NO_IBLOCK_CHOSEN"] = "Не выбран инфоблок";
|
||||
$MESS["YANDEX_ERR_NO_IBLOCK_FOUND"] = "Инфоблок не найден";
|
||||
$MESS["YANDEX_ERR_NO_ACCESS_IBLOCK"] = "Нет доступа к инфоблоку";
|
||||
$MESS["YANDEX_TAB1_TITLE"] = "Настройка выгрузки";
|
||||
$MESS["YANDEX_TAB1_DESC"] = "Настройка данных и типа выгрузки";
|
||||
$MESS["YANDEX_TAB2_TITLE"] = "Валюты и цены";
|
||||
$MESS["YANDEX_TAB2_DESC"] = "Настройка списка используемых валют и типов цен";
|
||||
$MESS["YANDEX_SKIP_PROP"] = "(не выводить)";
|
||||
$MESS["YANDEX_PROP_country_of_origin"] = "Страна производства товара";
|
||||
$MESS["YANDEX_PROP_vendor"] = "Производитель";
|
||||
$MESS["YANDEX_PROP_model"] = "Модель";
|
||||
$MESS["YANDEX_PROP_vendorCode"] = "Код производителя";
|
||||
$MESS["YANDEX_PROP_manufacturer_warranty"] = "Гарантия производителя";
|
||||
$MESS["YANDEX_PROP_author"] = "Автор";
|
||||
$MESS["YANDEX_PROP_publisher"] = "Издательство";
|
||||
$MESS["YANDEX_PROP_series"] = "Серия";
|
||||
$MESS["YANDEX_PROP_year"] = "Год издания";
|
||||
$MESS["YANDEX_PROP_ISBN"] = "Код книги (ISBN)";
|
||||
$MESS["YANDEX_PROP_volume"] = "Кол-во томов";
|
||||
$MESS["YANDEX_PROP_part"] = "Номер тома";
|
||||
$MESS["YANDEX_PROP_language"] = "Язык";
|
||||
$MESS["YANDEX_PROP_binding"] = "Переплет";
|
||||
$MESS["YANDEX_PROP_page_extent"] = "Кол-во страниц";
|
||||
$MESS["YANDEX_PROP_table_of_contents"] = "Оглавление";
|
||||
$MESS["YANDEX_PROP_performed_by"] = "Исполнитель";
|
||||
$MESS["YANDEX_PROP_performance_type"] = "Тип";
|
||||
$MESS["YANDEX_PROP_format"] = "Формат аудиокниги";
|
||||
$MESS["YANDEX_PROP_storage"] = "Носитель";
|
||||
$MESS["YANDEX_PROP_recording_length"] = "Время звучания (mm.ss)";
|
||||
$MESS["YANDEX_PROP_title"] = "Наименование";
|
||||
$MESS["YANDEX_PROP_artist"] = "Исполнитель";
|
||||
$MESS["YANDEX_PROP_director"] = "Режиссер";
|
||||
$MESS["YANDEX_PROP_starring"] = "Актеры";
|
||||
$MESS["YANDEX_PROP_originalName"] = "Оригинальное наименование";
|
||||
$MESS["YANDEX_PROP_country"] = "Страна";
|
||||
$MESS["YANDEX_PROP_media"] = "Носитель";
|
||||
$MESS["YANDEX_PROP_worldRegion"] = "Часть света";
|
||||
$MESS["YANDEX_PROP_region"] = "Курорт или город";
|
||||
$MESS["YANDEX_PROP_days"] = "Количество дней тура";
|
||||
$MESS["YANDEX_PROP_dataTour"] = "Даты заездов";
|
||||
$MESS["YANDEX_PROP_hotel_stars"] = "Звезды отеля (5*****)";
|
||||
$MESS["YANDEX_PROP_room"] = "Тип комнаты (SNG, DBL...)";
|
||||
$MESS["YANDEX_PROP_meal"] = "Тип питания (All, HB...)";
|
||||
$MESS["YANDEX_PROP_included"] = "Что включено в стоимость тура";
|
||||
$MESS["YANDEX_PROP_transport"] = "Транспорт";
|
||||
$MESS["YANDEX_PROP_place"] = "Место";
|
||||
$MESS["YANDEX_PROP_hall"] = "Зал";
|
||||
$MESS["YANDEX_PROP_date"] = "Дата и время";
|
||||
$MESS["YANDEX_PROP_is_premiere"] = "Премьера?";
|
||||
$MESS["YANDEX_PROP_is_kids"] = "Детское?";
|
||||
$MESS["YANDEX_TYPE"] = "Тип описания";
|
||||
$MESS["YANDEX_TYPE_SIMPLE"] = "упрощенное";
|
||||
$MESS["YANDEX_TYPE_NOTE"] = "Подробнее см. <a href=\"http://partner.market.yandex.ru/legal/tt/\" target=\"_blank\">http://partner.market.yandex.ru/legal/tt/</a>";
|
||||
$MESS["YANDEX_PROPS_COMMON"] = "Общие настройки";
|
||||
$MESS["YANDEX_PROPS_TYPE"] = "Настройки типа описания";
|
||||
$MESS["YANDEX_PROPS_NO"] = "нет";
|
||||
$MESS["YANDEX_PROPS_ADDITIONAL"] = "Дополнительные свойства для выгрузки";
|
||||
$MESS["YANDEX_PROPS_ADDITIONAL_TITLE"] = "Выберите свойства";
|
||||
$MESS["YANDEX_PROPS_ADDITIONAL_MORE"] = "Еще";
|
||||
$MESS["YANDEX_PRICES"] = "Цены";
|
||||
$MESS["YANDEX_PRICE_TYPE"] = "Выводить цену";
|
||||
$MESS["YANDEX_PRICE_TYPE_NONE"] = "оптимальную";
|
||||
$MESS["YANDEX_CURRENCIES"] = "Валюты";
|
||||
$MESS["YANDEX_CURRENCY"] = "валюта";
|
||||
$MESS["YANDEX_CURRENCY_RATE"] = "курс";
|
||||
$MESS["YANDEX_CURRENCY_RATE_SITE"] = "сайт";
|
||||
$MESS["YANDEX_CURRENCY_RATE_CBRF"] = "Центральный банк РФ";
|
||||
$MESS["YANDEX_CURRENCY_RATE_NBU"] = "Национальный банк Украины";
|
||||
$MESS["YANDEX_CURRENCY_RATE_NBK"] = "Национальный банк Казахстана";
|
||||
$MESS["YANDEX_CURRENCY_RATE_CB"] = "банк своего региона";
|
||||
$MESS["YANDEX_CURRENCY_PLUS"] = "коррекция курса";
|
||||
$MESS["YANDEX_PARAMS_TITLE"] = "Свойство";
|
||||
$MESS["YANDEX_ERR_NO_ACCESS_IBLOCK_SKU"] = "Нет доступа к инфоблоку торговых предложений";
|
||||
$MESS["YANDEX_ERR_NO_IBLOCK_SKU_FOUND"] = "Инфоблок торговых предложений #ID# не найден";
|
||||
$MESS["YANDEX_ERR_NO_IBLOCK_FOUND_EXT"] = "Инфоблок #ID# не найден";
|
||||
$MESS["YANDEX_ERR_NO_IBLOCK_IS_CATALOG"] = "Инфоблок #ID# не является торговым каталогом и не имеет торговых предложений";
|
||||
$MESS["YANDEX_ERR_NO_SECTION_LIST"] = "Список разделов не задан";
|
||||
$MESS["YANDEX_ERR_FILE_ACCESS_DENIED"] = "Недостаточно прав для перезаписи файла #FILE#";
|
||||
$MESS["YANDEX_ERR_FILE_OPEN_WRITING"] = "Невозможно открыть файл #FILE# для записи";
|
||||
$MESS["YANDEX_ERR_SETUP_FILE_WRITE"] = "Запись в файл #FILE# невозможна";
|
||||
$MESS["YANDEX_PRODUCT_PROPS"] = "--- Инфоблок товаров ---";
|
||||
$MESS["YANDEX_OFFERS_PROPS"] = "--- Инфоблок торговых предложений ---";
|
||||
$MESS["YANDEX_SKU_SETTINGS"] = "Выгрузка торговых предложений";
|
||||
$MESS["YANDEX_OFFERS_SELECT"] = "Условие отбора";
|
||||
$MESS["YANDEX_SKU_EXPORT_ALL_TITLE"] = "Все предложения товара";
|
||||
$MESS["YANDEX_SKU_EXPORT_MIN_PRICE_TITLE"] = "Предложение с минимальной ценой";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_TITLE"] = "Отбор по свойству";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_ID"] = "Свойство";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_COND"] = "Условие отбора";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_VALUE"] = "Значения";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_EMPTY"] = "--- выберите свойство ---";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_SELECT_ZERO"] = "пусто";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_SELECT_NONZERO"] = "не пусто";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_SELECT_EQUAL"] = "равно";
|
||||
$MESS["YANDEX_SKU_EXPORT_PROP_SELECT_NONEQUAL"] = "не равно";
|
||||
$MESS["YANDEX_SKU_EXPORT_ERR_CONDITION_ABSENT"] = "Не указано, по какому принципу фильтровать экспортируемые торговые предложения";
|
||||
$MESS["YANDEX_SKU_EXPORT_ERR_PROPERTY_ABSENT"] = "Не указано свойство, по значению которого фильтруются торговые предложения";
|
||||
$MESS["YANDEX_SKU_EXPORT_ERR_PROPERTY_COND_ABSENT"] = "Не указано условие фильтрации торговых предложений по свойству";
|
||||
$MESS["YANDEX_SKU_EXPORT_ERR_PROPERTY_VALUES_ABSENT"] = "Не указаны значения свойств для фильтрации торговых предложений";
|
||||
$MESS["YANDEX_SAVE_ERR"] = "Ошибки сохранения";
|
||||
$MESS["YANDEX_ERR_BAD_PRICE_TYPE"] = "Задан неверный тип цен для выгрузки";
|
||||
$MESS["YANDEX_ERR_BAD_OFFERS_IBLOCK_ID"] = "Неверный ID инфоблока торговых предложений";
|
||||
$MESS["YANDEX_ERR_SKU_SETTINGS_ABSENT"] = "Отсутствуют настройки экспорта торговых предложений";
|
||||
$MESS["YANDEX_ROOT_DIRECTORY"] = "Основной раздел каталога";
|
||||
$MESS["CET_ERROR_IBLOCK_PERM"] = "Недостаточно прав для работы с инфоблоком ##IBLOCK_ID#";
|
||||
$MESS["CES_ERROR_BAD_EXPORT_FILENAME"] = "Имя файла экспорта содержит запрещенные символы";
|
124
intaro.intarocrm/lang/export_setup_templ.php
Normal file
124
intaro.intarocrm/lang/export_setup_templ.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
$MESS["CET_ERROR_NO_NAME"] = "Введите название профиля выгрузки.";
|
||||
$MESS["CET_STEP1"] = "Шаг";
|
||||
$MESS["CET_STEP2"] = "из";
|
||||
$MESS["CET_SAVE"] = "Сохранить";
|
||||
$MESS["CET_ERROR_NO_IBLOCK1"] = "Информационный блок";
|
||||
$MESS["CET_ERROR_NO_IBLOCK2"] = "не найден.";
|
||||
$MESS["CET_ERROR_NO_FILENAME"] = "Не указано имя файла для экспорта.";
|
||||
$MESS["CET_ERROR_NO_GROUPS"] = "Не указаны выгружаемые группы.";
|
||||
$MESS["CET_ERROR_NO_PROFILE_NAME"] = "Введите название профиля выгрузки.";
|
||||
$MESS["CET_SELECT_IBLOCK"] = "Выберите инфоблок";
|
||||
$MESS["CET_SELECT_IBLOCK_EXT"] = "Выберите инфоблок для экспорта:";
|
||||
$MESS["CET_SELECT_GROUP"] = "Выберите группы:";
|
||||
$MESS["CET_FIRST_SELECT_IBLOCK"] = "Сначала выберите информационный блок";
|
||||
$MESS["CET_ALL_GROUPS"] = "Все группы";
|
||||
$MESS["CET_SERVER_NAME"] = "Доменное имя:";
|
||||
$MESS["CET_SERVER_NAME_SET_CURRENT"] = "текущее";
|
||||
$MESS["CET_SAVE_FILENAME"] = "Сохранить в файл:";
|
||||
$MESS["CET_PROFILE_NAME"] = "Имя профиля:";
|
||||
$MESS["CET_EXPORT"] = "Экспортировать";
|
||||
$MESS["CET_ERROR_NO_IBLOCKS"] = "Не указаны выгружаемые информационные блоки.";
|
||||
$MESS["CET_EXPORT_CATALOGS"] = "Каталоги для экспорта:";
|
||||
$MESS["CET_CATALOG"] = "Каталог";
|
||||
$MESS["CET_EXPORT2YANDEX"] = "Экспортировать в Яндекс.Товары";
|
||||
$MESS["CATI_DATA_EXPORT"] = "Экспорт данных";
|
||||
$MESS["CATI_NO_IBLOCK"] = "Информационный блок не выбран. Выгрузка невозможна.";
|
||||
$MESS["CATI_NO_FORMAT"] = "Укажите формат файла данных и его свойства.";
|
||||
$MESS["CATI_NO_DELIMITER"] = "Укажите символ-разделитель полей.";
|
||||
$MESS["CATI_NO_SAVE_FILE"] = "Укажите файл для сохранения результата.";
|
||||
$MESS["CATI_CANNOT_CREATE_FILE"] = "Ошибка создания файла данных.";
|
||||
$MESS["CATI_NO_FIELDS"] = "Не заданы поля для экспорта.";
|
||||
$MESS["CATI_SCHEME_EXISTS"] = "Схема с таким именем уже существует.";
|
||||
$MESS["CATI_PAGE_TITLE"] = "Выгрузка каталога: шаг";
|
||||
$MESS["CATI_NEXT_STEP"] = "Далее";
|
||||
$MESS["CATI_INFOBLOCK"] = "Информационный блок для экспорта:";
|
||||
$MESS["CATI_SCHEME_NAME"] = "Схема выгрузки:";
|
||||
$MESS["CATI_NOT"] = "Нет";
|
||||
$MESS["CATI_DELETE"] = "удалить";
|
||||
$MESS["CATI_FIELDS"] = "Задайте соответствие полей в файле полям в базе";
|
||||
$MESS["CATI_FI_ID"] = "Идентификатор";
|
||||
$MESS["CATI_FI_NAME"] = "Название";
|
||||
$MESS["CATI_FI_ACTIV"] = "Активность";
|
||||
$MESS["CATI_FI_ACTIVFROM"] = "Активность с";
|
||||
$MESS["CATI_FI_ACTIVTO"] = "Активность до";
|
||||
$MESS["CATI_FI_CATIMG"] = "Картинка для списка";
|
||||
$MESS["CATI_FI_CATDESCR"] = "Описание для списка";
|
||||
$MESS["CATI_FI_DETIMG"] = "Картинка";
|
||||
$MESS["CATI_FI_DETDESCR"] = "Описание";
|
||||
$MESS["CATI_FI_UNIXML"] = "Уникальный идентификатор";
|
||||
$MESS["CATI_FI_QUANT"] = "Количество";
|
||||
$MESS["CATI_FI_WEIGHT"] = "Вес";
|
||||
$MESS["CATI_FI_PROPS"] = "Свойство";
|
||||
$MESS["CATI_FI_GROUP_LEV"] = "Группа уровня";
|
||||
$MESS["CATI_FI_PRICE_TYPE"] = "Цена типа";
|
||||
$MESS["CATI_FIELD"] = "поле";
|
||||
$MESS["CATI_FORMAT_PROPS"] = "Задайте свойства формата файла";
|
||||
$MESS["CATI_DELIMITERS"] = "С разделителями";
|
||||
$MESS["CATI_DELIMITER_TYPE"] = "Разделитель полей";
|
||||
$MESS["CATI_TAB"] = "табуляция";
|
||||
$MESS["CATI_TZP"] = "точка с запятой";
|
||||
$MESS["CATI_ZPT"] = "запятая";
|
||||
$MESS["CATI_SPS"] = "пробел";
|
||||
$MESS["CATI_OTR"] = "другой";
|
||||
$MESS["CATI_SAVE_SCHEME"] = "Сохранить настройки как схему";
|
||||
$MESS["CATI_SSCHEME_NAME"] = "Имя схемы";
|
||||
$MESS["CATI_DATA_FILE_NAME"] = "Сохранить файл данных как...";
|
||||
$MESS["CATI_DATA_FILE_NAME1"] = "Имя файла данных";
|
||||
$MESS["CATI_SUCCESS"] = "Выгрузка завершена";
|
||||
$MESS["CATI_SU_ALL"] = "Всего выгружено строк:";
|
||||
$MESS["CATI_BACK"] = "Назад";
|
||||
$MESS["CATI_FIRST_LINE_NAMES"] = "Первая строка содержит имена полей";
|
||||
$MESS["CATI_SU_ALL1"] = "Скачать файл %DATA_URL% на свой компьютер";
|
||||
$MESS["CATI_FIELDS_NEEDED"] = "Выгружать";
|
||||
$MESS["CATI_FIELDS_NAMES"] = "Название поля";
|
||||
$MESS["CATI_FIELDS_SORTING"] = "Порядок";
|
||||
$MESS["CATI_NEXT_STEP_F"] = "Начать выгрузку";
|
||||
$MESS["CATI_DATA_FILE_NAME1_DESC"] = "Если такой файл существует, то он будет перезаписан";
|
||||
$MESS["CATI_TOO_MANY_TABLES"] = "Слишком большое объединение таблиц. Уменьшите количество экспортируемых свойств или типов цен.";
|
||||
$MESS["EST_QUANTITY_FROM"] = "Покупаемое количество от";
|
||||
$MESS["EST_QUANTITY_TO"] = "Покупаемое количество до";
|
||||
$MESS["EST_PRICE_TYPE"] = "Тип цен \"#TYPE#\"";
|
||||
$MESS["EST_PRICE_TYPE2"] = "Тип цен \"#NAME#\" (#TYPE#)";
|
||||
$MESS["CAT_DETAIL_PROPS"] = "Детальные настройки";
|
||||
$MESS["CAT_DETAIL_PROPS_RUN"] = "настроить";
|
||||
$MESS["CET_IS_SKU"] = "Выбран инфоблок торговых предложений.";
|
||||
$MESS["CET_USE_PARENT_SECT"] = "Использовать группы инфоблока товаров";
|
||||
$MESS["CET_YAND_RUN_ERR_IBLOCK_ABSENT"] = "Инфоблок ##IBLOCK_ID# не существует";
|
||||
$MESS["CET_YAND_RUN_ERR_PRODUCT_IBLOCK_ABSENT"] = "Инфоблок товаров ##IBLOCK_ID# не существует";
|
||||
$MESS["CET_YAND_RUN_ERR_SECTION_SET_EMPTY"] = "Список групп не задан";
|
||||
$MESS["CET_YAND_RUN_ERR_SETUP_FILE_ACCESS_DENIED"] = "Недостаточно прав для перезаписи файла #FILE#";
|
||||
$MESS["CET_YAND_RUN_ERR_SETUP_FILE_OPEN_WRITING"] = "Невозможно открыть файл #FILE# для записи";
|
||||
$MESS["CET_YAND_RUN_ERR_SETUP_FILE_WRITE"] = "Запись в файл #FILE# невозможна";
|
||||
$MESS["CET_YAND_SELECT_IBLOCK"] = "Инфоблок для экспорта";
|
||||
$MESS["CET_SELECT_IBLOCK_TYPE"] = "Выберите тип инфоблока";
|
||||
$MESS["CET_YAND_GROUP_AND_OFFERS"] = "Группы и товары для импорта";
|
||||
$MESS["CET_YAND_USE_IBLOCK_SITE"] = "Брать доменное имя из инфоблока";
|
||||
$MESS["CET_ERROR_IBLOCK_PERM"] = "Недостаточно прав для работы с инфоблоком ##IBLOCK_ID#";
|
||||
$MESS["YANDEX_ERR_SKU_SETTINGS_ABSENT"] = "Отсутствуют настройки экспорта торговых предложений";
|
||||
$MESS["CES_ERROR_BAD_EXPORT_FILENAME"] = "Имя файла экспорта содержит запрещенные символы";
|
||||
$MESS["CES_ERROR_BAD_EXPORT_FILENAME_EXTENTIONS"] = "Имя файла экспорта содержит запрещенное расширение";
|
||||
$MESS["CES_ERROR_FORBIDDEN_EXPORT_FILENAME"] = "Запрещенное имя файла экспорта";
|
||||
$MESS["CES_ERROR_PATH_WITHOUT_DEFAUT"] = "Экспорт может быть осуществлён только в папку, указанную в поле <b>Путь по умолчанию для экспортируемых файлов</b> настроек модуля.";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB1"] = "Инфоблок";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB1_TITLE"] = "Выбор информационного блока для экспорта";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB2"] = "Параметры экспорта";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB2_TITLE"] = "Настройка параметров экспорта";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB3"] = "Результат";
|
||||
$MESS["CAT_ADM_CSV_EXP_TAB3_TITLE"] = "Результат экспорта";
|
||||
$MESS["CAT_ADM_CSV_EXP_IBLOCK_ID"] = "Инфоблок";
|
||||
$MESS["CAT_ADM_CSV_EXP_ADD_SETTINGS"] = "Дополнительные настройки";
|
||||
$MESS["CAT_ADM_CSV_EXP_EXPORT_FILES"] = "Выгружать файлы";
|
||||
$MESS["CAT_ADM_CSV_EXP_TIME_STEP"] = "Время выполнения шага";
|
||||
$MESS["CAT_ADM_CSV_EXP_TIME_STEP_COMMENT"] = "0 - загрузить все сразу<br>положительное значение - число секунд на выполнение одного шага";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_ELEMENTS"] = "Поля и свойства элементов";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_SECTIONS"] = "Поля разделов";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_SECTIONS_EXT"] = "Поля и пользовательские свойства разделов";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_PRODUCT"] = "Свойства товара";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_PRICES"] = "Цены";
|
||||
$MESS["CAT_ADM_CSV_EXP_SEP_SKU"] = "Поля и свойства торговых предложений";
|
||||
$MESS["CAT_ADM_CSV_EXP_DESCR_SECT_PROP"] = "Пользовательское свойство";
|
||||
$MESS["CAT_ADM_CSV_EXP_SECTION_LEVEL"] = "Раздел уровня #LEVEL#";
|
||||
$MESS["CATI_FI_PRICE_TYPE2"] = "Цена типа \"#TYPE#\"";
|
||||
$MESS["CATI_FI_PRICE_TYPE3"] = "Цена типа \"#NAME#\" (#TYPE#)";
|
||||
$MESS["CATI_FI_PRICE_CURRENCY"] = "в валюте #CURRENCY#";
|
10
intaro.intarocrm/lang/icml_export_setup.php
Normal file
10
intaro.intarocrm/lang/icml_export_setup.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?
|
||||
$MESS["ERROR_FILENAME_NOT_SET"] = "Не указан файл данных.";
|
||||
$MESS["ERROR_PROFIE_NOT_SET"] = "Не указано имя профиля";
|
||||
$MESS["EXPORT_CATALOGS"] = "Выберите каталоги для выгрузки в ICML:";
|
||||
$MESS["CATALOG"] = "Каталог";
|
||||
$MESS["EXPORT2INTAROCML"] = "Выгрузить в ICML";
|
||||
$MESS["FILENAME"] = "Укажите имя файла данных:";
|
||||
$MESS["PROPERTY"] = "Свойство, содержащее артикул товара";
|
||||
$MESS["ALL_CATALOG"] = "Все каталоги";
|
||||
?>
|
19
intaro.intarocrm/lang/ru/install/step4.php
Executable file
19
intaro.intarocrm/lang/ru/install/step4.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$MESS ['STEP_NAME'] = 'Шаг 4';
|
||||
$MESS ['MOD_NEXT_STEP'] = 'Следующий шаг';
|
||||
$MESS ['MOD_PREV_STEP'] = 'Предыдущий шаг';
|
||||
$MESS ['DELIVERY_TYPES_LIST'] = 'Способы доставки';
|
||||
$MESS ['PAYMENT_TYPES_LIST'] = 'Способы оплаты';
|
||||
$MESS ['PAYMENT_STATUS_LIST'] = 'Статусы';
|
||||
$MESS ['ORDER_TYPES_LIST'] = 'Типы заказа';
|
||||
$MESS ['PAYMENT_LIST'] = 'Оплата';
|
||||
$MESS ['PAYMENT_Y'] = 'Оплачен';
|
||||
$MESS ['PAYMENT_N'] = 'Не оплачен';
|
||||
$MESS ['CANCELED'] = 'Флаг «Отменен»';
|
||||
$MESS ['INFO_1'] = ' Задайте соответствие между справочниками 1C-Битрикс и справочниками IntaroCRM.';
|
||||
$MESS ['LOAD_PERIOD'] = 'Выгружать каталог периодически';
|
||||
$MESS ['NOT_LOADING'] = 'Нет (по умолчанию)';
|
||||
$MESS ['CRON_LOADING'] = 'CRON';
|
||||
$MESS ['AGENT_LOADING'] = 'Агент';
|
||||
$MESS ['LOAD_NOW'] = 'Выгрузить сейчас';
|
||||
$MESS ['PROFILE_NAME'] = 'Имя профиля:';
|
Loading…
Reference in New Issue
Block a user