Answer the question
In order to leave comments, you need to log in
How to filter by properties of trade offers in bitrix catalog.section?
The smart filter has been slightly edited, so a separate file has been created for ajax requests and the component output catalog.section
to which the variable name is passed $arrFilter
.
The values of this array are formed from the data from the GET, as follows:
foreach ($_GET as $key => $get) :
if (is_array($get)) {
foreach ($get as $value) {
$arrFilter['PROPERTY_'.$key.'_VALUE'][] = $value;
}
}
endforeach;
SIZE
with the key and the goods are filtered. $arrFilter['PROPERTY_'.$key.'_VALUE']
I found in the documentation that filtering by trade offers is carried out in exactly the same way, that is, for example , PROPERTY_SIZE
or is indicated PROPERTY_SIZE_VALUE
, but it doesn’t work either way. How to filter by a trade offer property with the name SIZE
? Is it a problem with name conflicts? SIZE
now both goods and TP have it, while it is filtered by goods but not by TP.
Answer the question
In order to leave comments, you need to log in
The answer was given on the Bitrix forum in this thread - https://dev.1c-bitrix.ru/support/forum/forum6/topi...
foreach ($_GET as $key => $get) :
if (is_array ($get)) {
foreach ($get as $value) {
}
}
endforeach;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question