%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.225.56.233 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/bitrix.eshop/install/wizards/bitrix/eshop/site/services/iblock/ |
Upload File : |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); if(!CModule::IncludeModule("catalog")) return; if(COption::GetOptionString("eshop", "wizard_installed", "N", WIZARD_SITE_ID) == "Y" && !WIZARD_INSTALL_DEMO_DATA) return; //offers iblock import $shopLocalization = $wizard->GetVar("shopLocalization"); $iblockXMLFileOffers = "/bitrix/modules/bitrix.eshop/install/public/xml/".LANGUAGE_ID."/catalog_sku.xml"; if ($shopLocalization == "ua") $iblockXMLFilePricesOffers = "/bitrix/modules/bitrix.eshop/install/public/xml/".LANGUAGE_ID."/catalog_prices_sku_ua.xml"; elseif ($shopLocalization == "bl") $iblockXMLFilePricesOffers = "/bitrix/modules/bitrix.eshop/install/public/xml/".LANGUAGE_ID."/catalog_prices_sku_bl.xml"; else $iblockXMLFilePricesOffers = "/bitrix/modules/bitrix.eshop/install/public/xml/".LANGUAGE_ID."/catalog_prices_sku.xml"; $iblockCodeOffers = "clothes_offers_".WIZARD_SITE_ID; $iblockTypeOffers = "offers"; $rsIBlock = CIBlock::GetList(array(), array("XML_ID" => $iblockCodeOffers, "TYPE" => $iblockTypeOffers)); $IBLOCK_OFFERS_ID = false; if ($arIBlock = $rsIBlock->Fetch()) { $IBLOCK_OFFERS_ID = $arIBlock["ID"]; if (WIZARD_INSTALL_DEMO_DATA) { CIBlock::Delete($arIBlock["ID"]); $IBLOCK_OFFERS_ID = false; } } //--offers if($IBLOCK_OFFERS_ID == false) { $permissions = Array( "1" => "X", "2" => "R" ); $dbGroup = CGroup::GetList('', '', Array("STRING_ID" => "sale_administrator")); if($arGroup = $dbGroup -> Fetch()) { $permissions[$arGroup["ID"]] = 'W'; } $by = ""; $order = ""; $dbGroup = CGroup::GetList('', '', Array("STRING_ID" => "content_editor")); if($arGroup = $dbGroup -> Fetch()) { $permissions[$arGroup["ID"]] = 'W'; } \Bitrix\Catalog\Product\Sku::disableUpdateAvailable(); $IBLOCK_OFFERS_ID = WizardServices::ImportIBlockFromXML( $iblockXMLFileOffers, "clothes_offers", $iblockTypeOffers, WIZARD_SITE_ID, $permissions ); $iblockID1 = WizardServices::ImportIBlockFromXML( $iblockXMLFilePricesOffers, "clothes_offers", $iblockTypeOffers."_prices", WIZARD_SITE_ID, $permissions ); \Bitrix\Catalog\Product\Sku::enableUpdateAvailable(); if ($IBLOCK_OFFERS_ID < 1) return; $iblock = new CIBlock; $iblock->Update($IBLOCK_CATALOG_ID, array("LIST_MODE" => \Bitrix\Iblock\IblockTable::LIST_MODE_SEPARATE)); $_SESSION["WIZARD_OFFERS_IBLOCK_ID"] = $IBLOCK_OFFERS_ID; } else { $arSites = array(); $db_res = CIBlock::GetSite($IBLOCK_OFFERS_ID); while ($res = $db_res->Fetch()) $arSites[] = $res["LID"]; if (!in_array(WIZARD_SITE_ID, $arSites)) { $arSites[] = WIZARD_SITE_ID; $iblock = new CIBlock; $iblock->Update($IBLOCK_OFFERS_ID, array("LID" => $arSites)); } } ?>