Answer the question
In order to leave comments, you need to log in
How to display the value of the applied cart rule (number)?
\Bitrix\Sale\DiscountBase::getApplyResult(true)['RESULT']['BASKET'][1][0]['DESCR']
provides only a string value - "discount 10,000" (see documentation ). \Bitrix\Sale\DiscountBase::getApplyResult(true)['RESULT']['BASKET'][1][0]['DESCR']
"discount" is derived from a language variable$MESS['SALE_DISCOUNT_FORMATTER_MESS_TYPE_DISCOUNT']
(see \Bitrix\Sale\Discount\Formatter::formatRow ). (float) filter_var($applyResult['RESULT']['BASKET'][1][0]['DESCR'], FILTER_SANITIZE_NUMBER_FLOAT);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question