T
T
tgarl2021-09-16 13:19:51
1C-Bitrix
tgarl, 2021-09-16 13:19:51

How to get a value from a variable, not a string?

I'm trying to add a new rule for product discounts
using extends \CCatalogCondCtrlComplex inheritance and passing it
in the Generate method

"checkField('".$arControl['FIELD']."', '".$arOneCondition["value"]."', '".$arParams['FIELD']."')===".$logic;

but $arParams['FIELD'] stores the string = $arProduct

how do I get the values ​​of the $arProduct array and not the string

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2021-09-16
@Adamos

$arParams['FIELD'] stores string = $arProduct

Look up the code for the error that does this. Judging by the given line of code, this is a quote lost somewhere.

T
tgarl, 2021-09-17
@tgarl

Matter of quotes was
I convey

, '".$arParams['FIELD']."'

you need it without quotes
, ".$arParams['FIELD']."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question