add error message
This commit is contained in:
parent
d693c81cbc
commit
4902255e7d
1 changed files with 11 additions and 4 deletions
|
@ -144,7 +144,14 @@ class EventsHandlers
|
|||
}
|
||||
}
|
||||
|
||||
public function OnSaleComponentOrderResultPreparedHandler($order, $arUserResult, HttpRequest $request, $arParams, &$arResult)
|
||||
/**
|
||||
* @param $order
|
||||
* @param $arUserResult
|
||||
* @param \Bitrix\Main\HttpRequest $request
|
||||
* @param $arParams
|
||||
* @param $arResult
|
||||
*/
|
||||
public function OnSaleComponentOrderResultPreparedHandler($order, $arUserResult, HttpRequest $request, $arParams, &$arResult): void
|
||||
{
|
||||
if (ConfigProvider::getLoyaltyProgramStatus() === 'Y') {
|
||||
$isBonusError = false;
|
||||
|
@ -162,9 +169,9 @@ class EventsHandlers
|
|||
&& $isBonusError === false
|
||||
&& $arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'] > $bonusInput
|
||||
) {
|
||||
$arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'] = $arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'] - $bonusInput;
|
||||
$arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE_FORMATED'] = number_format($arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'], 0, ',', ' ' );
|
||||
$arResult['JS_DATA']['TOTAL']['BONUS_PAYMENT'] = $bonusInput;
|
||||
$arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'] -= $bonusInput;
|
||||
$arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE_FORMATED'] = number_format($arResult['JS_DATA']['TOTAL']['ORDER_TOTAL_PRICE'], 0, ',', ' ');
|
||||
$arResult['JS_DATA']['TOTAL']['BONUS_PAYMENT'] = $bonusInput;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue