I
I
iberk2017-04-24 18:35:37
1C-Bitrix
iberk, 2017-04-24 18:35:37

How to display products with a specific DETAIL_PROPERTY_CODE value?

Products have a "product of the day" flag, DETAIL_PROPERTY_CODE="product_day" with the value "Y". The question is how to display all the elements of the directory with this flag? The question may not sound quite correct, I just recently started communicating with Bitrix and I understand little about it

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2017-04-24
@rpsv

If the old kernel:
https://dev.1c-bitrix.ru/api_help/iblock/classes/c...

R
Roman Gritsuk, 2017-04-25
@winer

You can use the component settings.
catalog.section
Can be configured from the "gear" using the CUSTOM_FILTER parameter (this feature appeared relatively recently and is not available in older versions of bitrix).
Or you can use the FILTER_NAME parameter.
Before calling the component, declare a global array with filtering parameters, and pass its name to the component settings in the FILTER_NAME parameter.

<?
global $arrFilter;
$arrFilter= array(
    "PROPERTY_TOVAR_DAY"  => "Y"
);
?>
<? $APPLICATION->IncludeComponent(
    "bitrix:catalog.section",
    "main_events",
    Array(
//...
        "FILTER_NAME" => "arrFilter",
//...
    )
); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question