Answer the question
In order to leave comments, you need to log in
ocFilter module in OpenCart: How to search in all categories?
Hello, I am using ocFilter in OpenCart and there is one problem with it. It filters only products in the category the user is currently in. But I need it to filter and make a conclusion for all categories of the store (or at least one parent), regardless of which category page is currently open. How can this be implemented? Where to twist?
The filter.php file itself is here if it helps: https://www.dropbox.com/s/vqi3yjpkuyrkml9/filter.p...
Answer the question
In order to leave comments, you need to log in
logically, it clings to the current category in order to use a filter in it, we can recurse there until the last parent is found, and it will take out goods of a suitable nature from the database. set in the filter and by category. But there is a problem in logic, if we are already on a category, what's the point of pushing products from neighboring (from the parent) categories into it?
Look towards filters that allow you to select categories for filtering, you can get the best answer in them.
And don't forget that the user is a fool, but not a complete one, and understands that having entered the panties category in the parent machine (approx.) he does not want to receive tractors as a result, he is a special entered the panties category!!!
Plus a problem with a set of uniques. properties by which to filter, because there can be many more of them if we climb into the category of parents ....
I'll answer, even though it's an old thread. I am looking for a solution for another task, but here it can be solved quite simply - instead of subcategories like "Elit Series", we create the characteristic "Model", and for each product we prescribe the corresponding model, set redirects from old categories, transfer content to ocfilter landing pages. The characteristic can be distinguished by means of css. Thus, the filter will search through all child categories "Mattresses".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question