Updating Filter Product Count
Posted: Fri May 22, 2015 7:35 am
I have been attempting to improve the default filters to provide a better user experience.
There are plenty of filter extensions available but I would much rather work with the core code, hopefully to help others also improve their store.
The first improvement I made was to change the logic from "or" to "and": http://www.opencart.com/index.php?route ... n_id=19621
Now, the next improvement required is to hide empty filters dynamically. What is meant by this is that once a filter is applied and the page is reloaded, the product count will need to be updated in order to use this logic and hide the empty filters. However, the issue I am facing is that the default filter module does not update the product count once a filter is applied.
Basically the behaviour I am looking for is that a new count is performed on the updated product list/grid which then displays a product count relative to the filtered products currently visible.
Can anyone suggest a method to achieve this? Happy to consider a custom quote.
There are plenty of filter extensions available but I would much rather work with the core code, hopefully to help others also improve their store.
The first improvement I made was to change the logic from "or" to "and": http://www.opencart.com/index.php?route ... n_id=19621
Now, the next improvement required is to hide empty filters dynamically. What is meant by this is that once a filter is applied and the page is reloaded, the product count will need to be updated in order to use this logic and hide the empty filters. However, the issue I am facing is that the default filter module does not update the product count once a filter is applied.
Basically the behaviour I am looking for is that a new count is performed on the updated product list/grid which then displays a product count relative to the filtered products currently visible.
Can anyone suggest a method to achieve this? Happy to consider a custom quote.