Here’s what you need to get filters working in your OpenCart store:
- Create filter groups and filters.
- Assign filters to product categories.
- Assign filters to products.
- Activate filter module.
- Add filters to store layout.
- Bonus: make large filters look compact.
It does seem like a lot of work and you may ask why you need to assign product filters to categories. Why setting filters to products are not enough?
The answer is simple. Imagine that you have 10, 20 or more different filter groups in your store – color, size, weight, season, etc… And you’ll want to show filters in the category pages. If filters won’t be assigned to categories, they would all show up in all categories even if there are no products that have those filters. It would be a mess. So when you assign only some of the filters to the specific category, customer will have cleaner, simpler and more useful filter section in the category page.
How to create filter groups and filters in OpenCart
First step – go to OpenCart admin panel and select Catalog >> Filters in the main menu. To create a new filter group click Add new at the top right of the page.
What you need to enter here:
- Filter group name. That can be color, size, length – any group of data that you want to filter the products. If you have multiple languages in your store, you can name the filter groups differently.
- Sort order. It is used to order groups in the filter module (for the customer). For example, if you have more than one filter group in the category page (color, size, weight), you can show Color filter first by setting sort order to 1, Weight second if it’s sort order is 2 and so on. Lower number has the priority. You can leave this field empty if you don’t need specific ordering.
- Filter names. If the filter group is, for example, color, then filter names will be red, green, blue, etc. They also have sort numbers to you can order them exactly as you want.
How to add filters to categories in OpenCart
To add filters to store categories go to Catalog >> Categories, and edit one of the categories. Click on a Data tab and enter any filter you want to the filter field. All the filters with the similar names will show up, so everything you need to do is to select the filters you want to add.
All the selected filter will show up below in the list. You can add as many filters as you need, and you can remove any of them in a single click by hitting by the name of the filter.
How to add filters to products in OpenCart
If you want to add filters to OpenCart store product go to Catalog >> Products and edit the product you want to add filters to. Click on a Links tab and look for the Filter field. Enter filter name and select it from the dropdown menu. That’s it, filter is added to the product.
After adding or removing filters don’t forget to save changes.
You can add as many filters as you like, and you can remove them the same way as category filters – by clicking on symbol by the name of the filter. After adding or removing filters hit Save changes button at the top right corner of the page.
How to activate Filter module in OpenCart
After fresh OpenCart installation Filter module is not activated in the store. To activate it go to Extensions >> Extensions (or Extensions >> Modules depending on the OpenCart version you are using), find module Filter , and click Install button.
After installing click Edit button on the Filter module, and enable it.
How to show filters in OpenCart category, or any other page in the front end
To show filter for customers you need to add filter module to store’s layout. You can add filters to category pages, search, manufacturer or any pages.
If you want to add filters to category pages, go to Design >> Layouts (or System >> Design >> Layouts, depending on the OpenCart version you use), and edit Category layout.
You can add filter to column left or right, content top and bottom – in any position. For example, if you want it to show up on the left column, select Filter module on the column left, click Add module button, and save changes.
The changes will be visible immediately on the category pages:
The same technique is used for adding Filter module to other pages like Search page, Manufacturer pages and so on. Just edit the layout you want and add the Filter module to it.
How to make large filters look compact in your OpenCart store
Some stores have huge lists of filters that can look enormous on the store’s front page. If you want to make them look more compact and make them even easier to use you can try our Better Filter extension.
It makes large filters scrollable, and filters products on a single click, without need to click Refine Search button. More details about the extension can be found on the Better Filter page.