15require_once(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/prolog_admin_before.php');
17Loc::loadMessages(__FILE__);
18if (!Loader::includeModule(
'catalog'))
20 ShowError(Loc::getMessage(
'BX_CATALOG_REINDEX_REINDEX_ERRORS_MODULE_CATALOG_ABSENT'));
24if (!AccessController::getCurrent()->check(ActionDictionary::ACTION_PRICE_EDIT))
26 ShowError(Loc::getMessage(
'BX_CATALOG_REINDEX_ACCESS_DENIED'));
32 ShowError(Loc::getMessage(
'BX_CATALOG_REINDEX_ERRORS_INCORRECT_SESSION'));
36$request = Main\Context::getCurrent()->getRequest();
39 $request->getRequestMethod() ==
'GET'
44 'sessID' =>
$request[
'ajaxSessionID'],
45 'maxExecutionTime' =>
$request[
'maxExecutionTime'],
46 'maxOperationCounter' =>
$request[
'maxOperationCounter'],
48 'operationCounter' =>
$request[
'operationCounter'],
59 $catalogReindex->setParams(
$params);
60 $catalogReindex->run();
61 $result = $catalogReindex->saveStep();
63 header(
'Content-Type: application/x-javascript; charset='.
LANG_CHARSET);
64 echo CUtil::PhpToJSObject(
$result,
false,
true);
65 require(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/epilog_admin_after.php');
68 $request->getRequestMethod() ==
'GET'
73 header(
'Content-Type: application/x-javascript; charset='.
LANG_CHARSET);
75 require(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/epilog_admin_after.php');
78 $request->getRequestMethod() ==
'GET'
89 $emptyAvailable = Catalog\ProductTable::getList(
array(
90 'select' =>
array(
'ID',
'AVAILABLE'),
91 'filter' =>
array(
'=AVAILABLE' =>
null),
94 if (empty($emptyAvailable))
96 unset($emptyAvailable);
97 require(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/epilog_admin_after.php');
101 $APPLICATION->SetTitle(Loc::getMessage(
'BX_CATALOG_REINDEX_PAGE_TITLE'));
105 require(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/prolog_admin_after.php');
108 array(
'DIV' =>
'catalogReindexTab01',
'TAB' => Loc::getMessage(
'BX_CATALOG_REINDEX_TAB'),
'ICON' =>
'sale',
'TITLE' => Loc::getMessage(
'BX_CATALOG_REINDEX_TAB_TITLE'))
111 Main\Page\Asset::getInstance()->addJs(
'/bitrix/js/catalog/step_operations.js');
113 ?><div
id=
"catalog_reindex_error_div" style=
"margin:0; display: none;">
114 <div
class=
"adm-info-message-wrap adm-info-message-red">
115 <div
class=
"adm-info-message">
116 <div
class=
"adm-info-message-title"><?= Loc::getMessage(
'BX_CATALOG_REINDEX_ERRORS_TITLE') ?></div>
117 <div
id=
"catalog_reindex_error_cont"></div>
118 <div
class=
"adm-info-message-icon"></div>
122 <form name=
"catalog_reindex_form" action=
"<?= $APPLICATION->GetCurPage() ?>" method=
"GET"><?php
126 <td
width=
"40%"><?= Loc::getMessage(
'BX_CATALOG_REINDEX_IBLOCK_ID') ?></td>
127 <td
width=
"60%"><?php
130 'select' =>
array(
'IBLOCK_ID'),
131 'filter' =>
array(
'=PRODUCT_IBLOCK_ID' => 0)
140 'select' =>
array(
'PRODUCT_IBLOCK_ID'),
141 'filter' =>
array(
'>PRODUCT_IBLOCK_ID' => 0)
155 <td
width=
"40%"><?= Loc::getMessage(
'BX_CATALOG_REINDEX_MAX_EXECUTION_TIME') ?></td>
156 <td
width=
"60%"><input type=
"text" name=
"max_execution_time" id=
"max_execution_time" size=
"3" value=
"<?= $oneStepTime ?>"></td>
161 <input type=
"button" id=
"catalog_reindex_start_button" value=
"<?= Loc::getMessage('BX_CATALOG_REINDEX_UPDATE_BTN') ?>">
162 <input type=
"button" id=
"catalog_reindex_stop_button" value=
"<?= Loc::getMessage('BX_CATALOG_REINDEX_STOP_BTN') ?>" disabled>
166 <div
id=
"reindexReport" style=
"display: none;"></div>
171 'ajaxSessionID' =>
'catalogReindex',
173 'maxOperationCounter' => 10,
177 'startBtnID' =>
'catalog_reindex_start_button',
178 'stopBtnID' =>
'catalog_reindex_stop_button',
179 'catalogSelectID' =>
'catalog_reindex_iblock_id',
180 'timeFieldID' =>
'max_execution_time',
181 'reportID' =>
'reindexReport',
182 'prefix' =>
'catalog_reindex_iblock_',
183 'resultContID' =>
'catalog_reindex_result_div_',
184 'errorContID' =>
'catalog_reindex_error_cont_',
185 'errorDivID' =>
'catalog_reindex_error_div_'
187 'ajaxParams' =>
array(
193 var jsCatalogReindex =
new BX.Catalog.CatalogReindex(<?= CUtil::PhpToJSObject(
$jsParams,
false,
true) ?>);
196 require(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/modules/main/include/epilog_admin.php');
while($arIBlock=$rsIBlocks->Fetch()) $catalogIterator
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
static clearIblockTagCache($iblock_id)
static getIblockList($iblockId)
static getDefaultExecutionTime()
static PhpToJSObject($arData, $bWS=false, $bSkipTilda=false, $bExtType=false)
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Form FILTER_ACTION disabled
GetIBlockDropDownList($IBLOCK_ID, $strTypeName, $strIBlockName, $arFilter=false, $strAddType='', $strAddIBlock='')
if(! $catalogEdit->isSuccess()) $iblock
$_SERVER["DOCUMENT_ROOT"]
check_bitrix_sessid($varname='sessid')
ShowError($strError, $cls="errortext")
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']