diff --git a/intaro.intarocrm/classes/general/ICMLLoader.php b/intaro.intarocrm/classes/general/ICMLLoader.php new file mode 100644 index 00000000..c2ee5c29 --- /dev/null +++ b/intaro.intarocrm/classes/general/ICMLLoader.php @@ -0,0 +1,331 @@ +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) . "
"); + else + print(htmlspecialcharsbx($obj) . "
"); + */ + + + $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, "\n"); + @fwrite($this->fp, "\n"); + + @fwrite($this->fp, "".$this->application->ConvertCharset(htmlspecialcharsbx(COption::GetOptionString("main", "site_name", "")), LANG_CHARSET, $encoding)."\n"); + + @fwrite($this->fp, "".$this->application->ConvertCharset(htmlspecialcharsbx(COption::GetOptionString("main", "site_name", "")), LANG_CHARSET, $encoding)."\n"); + + } + + protected function WriteCategories($categories) + { + @fwrite($this->fp, "\n"); + foreach ($categories as $category) { + @fwrite($this->fp, $category . "\n"); + } + @fwrite($this->fp, "\n"); + } + protected function WriteOffers($offers) + { + @fwrite($this->fp, "\n"); + foreach ($offers as $offer) { + @fwrite($this->fp, $offer . "\n"); + } + @fwrite($this->fp, "\n"); + } + + protected function PostWriteCatalog() + { + @fwrite($this->fp, "\n"); + @fwrite($this->fp, "\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 " + 0 ? + " parentId=\"" . $arCategory["IBLOCK_SECTION_ID"] . "\"" + :"") + . ">" + . $arCategory["NAME"] + . ""; + + } + + 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 .= "" . $arResCategory["ID"] . "\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 .= "" . $arResCategory["ID"] . "\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 .= "\n"; + $offer .= "http://" . $iblock['IBLOCK_DB']['SERVER_NAME'] . $arOffer['DETAIL_PAGE_URL'] . "\n"; + + $offer .= "" . $arOffer['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 .= "" . $strFile . "\n"; + } + } + + $offer .= "" . $this->PrepareValue($arOffer["NAME"]) . "\n"; + $offer .= "" . (strip_tags( html_entity_decode(str_replace(" ", ' ', $this->PrepareValue($arOffer["DETAIL_TEXT"]))))) . + "\n"; + + + $offer .= "" . $arOffer["EXTERNAL_ID"] . "\n"; + $offer .= "" . $arOffer["PRODUCT_NAME"] . "\n"; + $offer .= "
" . $arOffer["ARTICLE"] . "
\n"; + + $offer.= "
\n"; + return $offer; + } + + + +} \ No newline at end of file diff --git a/intaro.intarocrm/include.php b/intaro.intarocrm/include.php index 0851bb33..34c55087 100755 --- a/intaro.intarocrm/include.php +++ b/intaro.intarocrm/include.php @@ -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' ) ); \ No newline at end of file diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php index 334ec133..f7816273 100755 --- a/intaro.intarocrm/install/index.php +++ b/intaro.intarocrm/install/index.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'); } -} \ No newline at end of file + + 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; + } +} diff --git a/intaro.intarocrm/install/step4.php b/intaro.intarocrm/install/step4.php index 931fdfcc..81178e93 100644 --- a/intaro.intarocrm/install/step4.php +++ b/intaro.intarocrm/install/step4.php @@ -1,10 +1,228 @@ -
- - - - "> - +if(!check_bitrix_sessid()) return; +IncludeModuleLangFile(__FILE__); +__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intaro.intarocrm/lang/", "/icml_export_setup.php")); + +?> + +

+ "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; + + ?> + + + + + + + + + + + + + + + + + + $arIBlock) + { + ?> + + + + + + + +
+
+
+
+   +
+
+
+
+ + + > + + +   +
+ + + + " + + onclick="checkOne(this,);" + > + + + +
+ +
+
+
+ +

+ + +
+
+
+ +

+
+
+
+
+
+   + +
+
+
+ + + + + + + + + + + + + + + +
+
+ " class="adm-btn-save"> +
+
+ " class="adm-btn-save"> +
+
+
+ + diff --git a/intaro.intarocrm/install/step5.php b/intaro.intarocrm/install/step5.php new file mode 100644 index 00000000..931fdfcc --- /dev/null +++ b/intaro.intarocrm/install/step5.php @@ -0,0 +1,10 @@ + + +
+ + + + "> + diff --git a/intaro.intarocrm/lang/export_crm.php b/intaro.intarocrm/lang/export_crm.php new file mode 100644 index 00000000..1d7584ba --- /dev/null +++ b/intaro.intarocrm/lang/export_crm.php @@ -0,0 +1,109 @@ +http://partner.market.yandex.ru/legal/tt/"; +$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"] = "Имя файла экспорта содержит запрещенные символы"; \ No newline at end of file diff --git a/intaro.intarocrm/lang/export_setup_templ.php b/intaro.intarocrm/lang/export_setup_templ.php new file mode 100644 index 00000000..91f43fbc --- /dev/null +++ b/intaro.intarocrm/lang/export_setup_templ.php @@ -0,0 +1,124 @@ +Путь по умолчанию для экспортируемых файлов настроек модуля."; +$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 - загрузить все сразу
положительное значение - число секунд на выполнение одного шага"; +$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#"; \ No newline at end of file diff --git a/intaro.intarocrm/lang/icml_export_setup.php b/intaro.intarocrm/lang/icml_export_setup.php new file mode 100644 index 00000000..3a47d2fe --- /dev/null +++ b/intaro.intarocrm/lang/icml_export_setup.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/intaro.intarocrm/lang/ru/install/step4.php b/intaro.intarocrm/lang/ru/install/step4.php new file mode 100755 index 00000000..5dea2bba --- /dev/null +++ b/intaro.intarocrm/lang/ru/install/step4.php @@ -0,0 +1,19 @@ +