Answer the question
In order to leave comments, you need to log in
How to make a filter by property with underlining on Bitrix?
The GetList function according to the documentation accepts
arFilter = array(
"(modif)prop" => val/null/false,
"(modif)prop" => val/null/false
);
if the filter is multiple then
arFilter = array(
"logic" => "or",
array(
"(modif)prop" => val/null/false,
"(modif)prop" => val/null/false
),
array(
"(modif)prop" => val/null/false,
"(modif)prop" => val/null/false
),
);
In general, everything works, but the question remains - how to filter by properties, in the code of which there is an underscore?
PROPERTY_PRODUCT_CODE_VALUE == does not work, because Bitrix thinks that it is required to filter by the CODE field of the PRODUCT property, and not by the VALUE field of the PRODUCT_CODE property.
Answer the question
In order to leave comments, you need to log in
The easiest option is to use the property's numeric ID. PROPERTY_9_VALUE.
Not very pretty but should work. In order not to have to replace the property ID with a different value in which case throughout the site, you can use constants.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question