A
A
Askfortrue2019-11-08 12:31:17
1C-Bitrix
Askfortrue, 2019-11-08 12:31:17

How to insert the "Search by Headers" component into the "Catalog" complex component using component epilog?

Hello
In the complex component Catalog you need to insert another component - search by headings. The fact is that they are used together and it is logical to give a place in the search by headings in the template of the complex Catalog component.
It would be possible to place it on top, but this option is not suitable.
1. We have 2 components.
What needs to be placed in the component epilog file, and what needs to be placed in the right place in the catalog complex component for this to work?
Where to start and where to end?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
justbefree, 2019-11-08
@justbefree

if I understand the essence correctly, then as an option for implementing a search by headings in your catalog:
add an ordinary search string in the catalog template. hang on submit a handler in js that will get the entered string and send it with an ajax request to the page where "Search by titles" will be placed, let's
say /local/php_interface/ajax/search_title.php
in search_title.php you need to export the search.title
component will customize the template for it. in result_modifier.php get the id of the found elements from $arResult and return the resulting array with id in json format.
then everything is just based on the received id of the elements in the catalog, you need to set a filter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question