- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/propertyindex/facet.php
- Класс: BitrixIblockPropertyIndexFacet
- Вызов: Facet::addPriceFilter
public function addPriceFilter($priceId, $operator, $value)
{
$facetId = $this->storage->priceIdToFacetId($priceId);
if ($operator == "<=" || $operator == ">=")
{
$this->where[$operator.$facetId] = array(
"TYPE" => Storage::PRICE,
"OP" => $operator,
"FACET_ID" => $facetId,
"VALUES" => array(doubleval($value)),
);
if (isset($this->where[">=".$facetId]) && isset($this->where["<=".$facetId]))
{
$this->where["><".$facetId] = array(
"TYPE" => Storage::PRICE,
"OP" => "><",
"FACET_ID" => $facetId,
"VALUES" => array(
$this->where[">=".$facetId]["VALUES"][0],
$this->where["<=".$facetId]["VALUES"][0]
),
);
unset($this->where[">=".$facetId]);
unset($this->where["<=".$facetId]);
}
}
}