D
D
doctorcat2016-08-04 14:49:45
MODX
doctorcat, 2016-08-04 14:49:45

Filter ajax livesearch modx evo how to pass parameters from the page to the search query?

Good afternoon. I ask for help, for the 3rd day I have been trying to solve the problem of creating a filter in the catalog by name and the presence of 2 parameters. These parameters in the trailer are the tv properties of the product. The first of them - "display on the main" is a checkbox that is pressed in the product settings. At the moment I have a working livesearch product search in principle with the correct output to the template, but I do not know how to pass parameters from the search page to the search query. For example, the same pressed checkbox, the second moment the filter by price, is designed as a jquery slider range and I need to run the filter after the change event in the slider. Please tell me how this can be done?

Вот так в текущий момент выглядит мой запрос. Я только начал осваивать &filter. По сути его механизм мне подходит, но мне нужно как то передавать параметры в него со страницы.
[!AjaxSearch?&jscript=`jquery`&extractShow=`1`&withTvs=`product-img-block,price,na_glavniyu`&liveSearch=`1`&tplAjaxResults=`ajax-null`&tplAjaxResult=`ajax-pag-null`&filter=`price,1400,4`!]

Заранее благодарен. Уже потерял надежду справиться с этой проблемой.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hetzerok, 2016-08-04
@hetzerok

If you write a snippet yourself, then $_GET arrays, including $_POST arrays, are available inside it. Then, inside your snippet, you can call ajaxsearch through runSnippet and pass all the necessary parameters to it.
Regarding the event in the slider - api.jquery.com/trigger

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question