M
M
m4son2018-10-25 02:49:40
1C-Bitrix
m4son, 2018-10-25 02:49:40

How to pass an array of compared products to the "catalogue section elements" component in 1s-Bitrix?

There is a "list of compared products" component. How do I get them to look like a directory partition??
I think it's possible to pass the compared goods to the "catalogue section elements" component, or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
m4son, 2018-10-25
@m4son

copy the component template, and in the result_modifier.php file at the end write $arResult["ITEMS"] = $_SESSION["CATALOG_COMPARE_LIST"][16]["ITEMS"];
where CATALOG_COMPARE_LIST - Unique name for the comparison list, specified in the "catalog" component settings, 16 - infoblock id

I
Ilya Malinovsky, 2018-10-25
@iliya936

Before calling catalog.section write the following

global $arFilter;
$arFilter = array(“ID”=>array(id сравниваемых товаров);

And after that add the FILTER_NAME => “arFilter” parameter to the catalog.section component

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question