Skip to content

Instantly share code, notes, and snippets.

@Talyzenkov
Talyzenkov / changeSmartFilterLogic.php
Last active June 18, 2023 10:14
Change bitrix smartfilter logic for one property from "OR" to "AND"
<?php
/*
Change bitrix smartfilter logic for one property from "OR" to "AND"
*/
$arPropIds = ['37', '38']; // ID properties for changing
$bSubfilter = 0;
foreach ($arPropIds as $propId)
{
if ($GLOBALS['arrFilter']['=PROPERTY_' . $propId] && count($GLOBALS['arrFilter']['=PROPERTY_' . $propId]) > 1)
{