13require_once
$_SERVER[
'DOCUMENT_ROOT'] .
'/bitrix/modules/main/include/prolog_admin_before.php';
18 ShowError(Loc::getMessage(
'SALE_DISCOUNT_REINDEX_ERRORS_RIGHTS'));
24 ShowError(Loc::getMessage(
'SALE_DISCOUNT_REINDEX_ERRORS_INCORRECT_SESSION'));
28if (!Loader::includeModule(
'sale'))
30 ShowError(Loc::getMessage(
'SALE_DISCOUNT_REINDEX_ERRORS_MODULE_SALE_ABSENT'));
34if (!Loader::includeModule(
'catalog'))
36 ShowError(Loc::getMessage(
'SALE_DISCOUNT_REINDEX_ERRORS_MODULE_CATALOG_ABSENT'));
41$request = Main\Context::getCurrent()->getRequest();
44 $request->getRequestMethod() ===
'GET'
49 'sessID' =>
$request[
'ajaxSessionID'],
50 'maxExecutionTime' =>
$request[
'maxExecutionTime'],
51 'maxOperationCounter' =>
$request[
'maxOperationCounter'],
53 'operationCounter' =>
$request[
'operationCounter'],
63 $discountReindex->run();
64 $result = $discountReindex->saveStep();
71 'MODULE_ID' =>
'sale',
72 'TAG' => Sale\Discount::ERROR_ID,
84 header(
'Content-Type: application/x-javascript; charset=' .
LANG_CHARSET);
85 echo CUtil::PhpToJSObject(
$result,
false,
true);
86 require
$_SERVER[
'DOCUMENT_ROOT'] .
'/bitrix/modules/main/include/epilog_admin_after.php';
90 $APPLICATION->SetTitle(Loc::getMessage(
'SALE_DISCOUNT_REINDEX_PAGE_TITLE'));
95 require
$_SERVER[
'DOCUMENT_ROOT'] .
'/bitrix/modules/main/include/prolog_admin_after.php';
99 'DIV' =>
'discountReindexTab01',
100 'TAB' => Loc::getMessage(
'SALE_DISCOUNT_REINDEX_TAB'),
102 'TITLE' => Loc::getMessage(
'SALE_DISCOUNT_REINDEX_TAB_TITLE'),
106 Main\Page\Asset::getInstance()->addJs(
'/bitrix/js/catalog/step_operations.js');
108 ?><div
id=
"discount_reindex_result_div" style=
"margin:0; display: none;"></div>
109 <div
id=
"discount_reindex_error_div" style=
"margin:0; display: none;">
110 <div
class=
"adm-info-message-wrap adm-info-message-red">
111 <div
class=
"adm-info-message">
112 <div
class=
"adm-info-message-title"><?= Loc::getMessage(
'SALE_DISCOUNT_REINDEX_ERRORS_TITLE'); ?></div>
113 <div
id=
"discount_reindex_error_cont"></div>
114 <div
class=
"adm-info-message-icon"></div>
118 <form name=
"discount_reindex_form" action=
"<?= $APPLICATION->GetCurPage(); ?>" method=
"GET"><?php
122 <td
style=
"width: 40%;"><?= Loc::getMessage(
'SALE_DISCOUNT_REINDEX_MAX_EXECUTION_TIME'); ?></td>
123 <td><input type=
"text" name=
"max_execution_time" id=
"max_execution_time" size=
"3" value=
"<?= $oneStepTime; ?>"></td>
127 <input type=
"button" id=
"start_button" value=
"<?= HtmlFilter::encode(Loc::getMessage('SALE_DISCOUNT_REINDEX_UPDATE_BTN')); ?>"<?= (
$discountCounter > 0 ?
'' :
' disabled'); ?>>
128 <input type=
"button" id=
"stop_button" value=
"<?= HtmlFilter::encode(Loc::getMessage('SALE_DISCOUNT_REINDEX_STOP_BTN')); ?>" disabled>
136 'ajaxSessionID' =>
'saleDiscountReindex',
138 'maxOperationCounter' => 10,
142 'startBtnID' =>
'start_button',
143 'stopBtnID' =>
'stop_button',
144 'resultContID' =>
'discount_reindex_result_div',
145 'errorContID' =>
'discount_reindex_error_cont',
146 'errorDivID' =>
'discount_reindex_error_div',
147 'timeFieldID' =>
'max_execution_time',
155 var jsStepOperations =
new BX.Catalog.StepOperations(<?= CUtil::PhpToJSObject(
$jsParams,
false,
true); ?>);
158 require
$_SERVER[
'DOCUMENT_ROOT'] .
'/bitrix/modules/main/include/epilog_admin.php';
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
static GetList($arSort=[], $arFilter=[])
static getDefaultExecutionTime()
Form FILTER_ACTION disabled
$_SERVER["DOCUMENT_ROOT"]
check_bitrix_sessid($varname='sessid')
ShowError($strError, $cls="errortext")
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']