Answer the question
In order to leave comments, you need to log in
How to properly connect kartik range slider to ProductPitSearch?
Hello.
Can you please explain how to properly connect kartik range slider to ProductPitSearch or do I need a separate form for it???
If separately, then how then to search and output correctly ???
Answer the question
In order to leave comments, you need to log in
You have a ProductPitSearch model
, it should have a price attribute, respectively, a string with min and max separated by commas will fall into it. Let's make an array out of it:
now add a filter:
$query->filterWhere([
'and',
['>', 'somePriceAttr', $this->price[0]],
['<', 'somePriceAttr', $this->price[1]]
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question