W
W
wagwandude2016-06-10 05:36:15
PHP
wagwandude, 2016-06-10 05:36:15

How to fix adding to comparison?

Hello.

I’m setting up the layout for an online store on Bitrix, I’ve already completed 60% of the percent and faced such a problem as the inoperability of the link to add a product to comparison.

Comparison in the settings of the "Catalogue" component is enabled.
There is a link in the product card template:

<a href="?action=ADD_TO_COMPARE_LIST&id=<?=$arResult['ID']?>">Сравнить</a>

When you click on which, nothing is added to the comparison page (/catalog/compare/)

Tell me, what else should be present in the template file for ?action=ADD_TO_COMPARE_LIST to work?
Generally speaking - I'm at an impasse.

To customize the appearance of the product card, I copied the catalog component to my template folder and now the product card template is located at this address:
\bitrix\templates\my_template\components\bitrix\catalog\template1\bitrix\catalog.element\.default\template.php


Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
no_one_safe, 2016-06-10
@no_one_safe

Do you want to add a product to comparison on the product page?
Then in the file \bitrix\templates\my_template\components\bitrix\catalog\template1\element.php there should be a call to the catalog.compare.list component

S
Sergey, 2016-06-10
@Logic87

Apparently, the layout is broken somewhere or you did not copy the component template to the end.
Apply the default template, test its performance, copy the template, check its performance again. After that, slowly change the layout.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question