I
I
iTJack2015-12-27 15:10:00
CMS
iTJack, 2015-12-27 15:10:00

How to display a product at a certain price in Bitrix?

Hello. How can I make a selection of goods at one price?
Let's say there is a section (menu item) "Everything for 99 rubles" and you need to get there goods that have or will have a price of 99 rubles.
Now works through properties. The property indicates a checkmark that the product is priced at 99 rubles. And then on the page, the component filters the products by
this property.
I would like to avoid this design, so that when the price for the product changes to the desired one (let's say 99 rubles), it automatically appears on this
page.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iTJack, 2015-12-30
@iTJack

Resolved:
In the catalog complex component, it is possible to pass a "filter" that should work as the arFilter parameter of the CIBlockElement::GetList method . It looks like this:

$APPLICATION->IncludeComponent(
        "bitrix:catalog",
        "",
        Array(
        ...
            "USE_FILTER" => "Y",
            "FILTER_NAME" => "arFilter",
        ...
            ),
            false
        );

To filter by price, arFilter should look something like this:
global $arFilter;
    $arFilter['CATALOG_PRICE_1'] = '99';

CATALOG__ - filter by the CATALOG_FIELD field from the price of the PRICE_TYPE type (price type ID), where CATALOG_FIELD can be: PRICE - price, CURRENCY - currency.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question