In-Portal Issue Tracker - In-Commerce
Viewing Issue Advanced Details
1126 [In-Portal CMS] Front End bug report always 2011-09-27 06:31 2012-07-25 05:31
alex  
Dmitry  
normal  
closed  
fixed  
 
none 5.2.0-B2  
3
0001126: Implement Smart Filters
Create a separate section where all possible filters are listed (product fields) + populate “product options” periodically (optional)

Custom filter - create method, that will have product field on input. Method will use list object and replace SELECT part to given field, COUNT(*) and group by that field. As a result we will get product count for each of that field values. Then, list all values in filter. Display filter text according to kOptionsFormatter (like ManufacturerId field) of that field or just value, when formatter is missing (like CachedRating field).

-------------

Front-End:
1. "[х] All" option above each filter
2. don't change filter counts/remove options when this/other filters are applied
1. добавить таблицу ItemFilters (FilterId, ItemPrefix, FilterField, FilterType (как у Custom Field) , Enabled) - 0.5 h
2. добавить секцию в административной консоли, где можно будет добавлять, включать/выключать фильтры - 1 h
3. сделать тэг PrintItemFilters, который будет поакзывать включённые фильтры согластно текущему префиксу (если смотрим на товары, то фильтры по товарам, если смотрим на категории, то фильтры по категориям - 3 h
4. сделать параметр у тэга PrintItemFilters, кототрый будет говорить, что нужно делать count только по текущей категории, а не со всего сайта в принципе - 0.5 h
5. при распечатке фильтра будет деллаться 1 запрос с COUNT(*) и GROUP BY чтобы понять сколько товаров/категорий/чего надо в каждом из значений фильтра (напр. сколько товарв в этой категории у каждого из производителей) - 1 h
6. запрос будет кешироваться (только если включён memcache) по префиксу фильтра, т.е. если это кол-во товаров и менялись товары, то кеш будет сброшен; также если это COUNT по категории, то ID катеогрии будет добавлено в ключ кеширования
7. значения фильтра, у которых 0 товаров не показываются в фильтре - 1 h
8. выбор значения одного фильтра может уменьшать значения в другом фильтре через ajax - 0.5 h
9. сделать ajax событие, которое будет делать как-бы тоже, что и тэг PrintItemFilters только данные будут возвращаться через JSON для пред. пункта - 3 h
parent of 0001229closed  (5.2.0)alex In-Portal CMS Missing Permissions for Item Filters and Spam Reports on Clean install 
parent of 0001223closed  (5.2.0)!COMMUNITY In-Portal CMS Fatal on viewing page in Browse Mode via Catalog with MySQL in Strict mode 
related to 0001201closed  (5.2.0)alex In-Portal CMS Fatal error during Installation on States import with MySQL in Strict Mode 
patch smart_filters_core.patch (33,057) 2011-12-20 10:23
http://tracker.in-portal.org/file_download.php?file_id=1389&type=bug
patch smart_filters_modules.patch (1,465) 2011-12-20 10:23
http://tracker.in-portal.org/file_download.php?file_id=1390&type=bug
patch smart_filters_themes.patch (24,058) 2011-12-20 10:23
http://tracker.in-portal.org/file_download.php?file_id=1391&type=bug
patch missing_smart_filter_phrases.patch (4,393) 2011-12-27 10:05
http://tracker.in-portal.org/file_download.php?file_id=1418&type=bug
Issue History
2012-07-25 05:31 alex Note Added: 0004988
2012-07-25 05:31 alex Status resolved => closed
2012-03-27 03:01 alex Relationship added parent of 0001223
2012-03-22 12:00 Dmitry Relationship added parent of 0001229
2012-02-06 04:07 alex Relationship added related to 0001201
2012-01-20 13:49 alex Status reviewed and tested => resolved
2012-01-20 13:49 alex Fixed in Version => 5.2.0-B2
2012-01-20 13:49 alex Resolution open => fixed
2012-01-20 12:37 Dmitry Note Added: 0004427
2012-01-20 12:37 Dmitry Status needs testing => reviewed and tested
2012-01-20 12:36 Dmitry Assigned To alex => Dmitry
2012-01-20 12:36 Dmitry Developer alex => Dmitry
2012-01-20 12:36 Dmitry Status needs work => needs testing
2012-01-20 08:04 alex Note Added: 0004426
2012-01-20 08:00 alex Changeset attached 1.0.x r15093
2012-01-18 14:11 Dmitry Note Added: 0004424
2012-01-18 14:11 Dmitry Assigned To Dmitry => alex
2012-01-18 14:11 Dmitry Status needs testing => needs work
2012-01-13 09:17 alex Changeset attached 5.2.x r15037
2012-01-09 15:32 Dmitry Changeset attached 5.2.x r15023
2012-01-04 07:17 alex Note Added: 0004386
2012-01-04 07:17 alex Assigned To alex => Dmitry
2012-01-04 07:17 alex Status needs work => needs testing
2012-01-04 07:16 alex Changeset attached 1.0.x r14982
2012-01-04 07:16 alex Changeset attached 5.2.x r14981
2012-01-04 05:31 alex Changeset attached 1.0.x r14980
2012-01-04 05:27 alex Changeset attached 5.2.x r14979
2011-12-29 18:15 Dmitry Note Added: 0004357
2011-12-29 18:15 Dmitry Assigned To Dmitry => alex
2011-12-29 18:15 Dmitry Status needs testing => needs work
2011-12-29 12:45 alex Note Edited: 0004298 bug_revision_view_page.php?bugnote_id=0004298#r952
2011-12-27 12:05 alex Changeset attached 5.2.x r14927
2011-12-27 10:06 alex Changeset attached 5.2.x r14925
2011-12-27 10:05 alex File Added: missing_smart_filter_phrases.patch
2011-12-27 04:58 alex Note Added: 0004321
2011-12-27 04:58 alex Assigned To alex => Dmitry
2011-12-27 04:58 alex Status needs work => needs testing
2011-12-27 04:54 alex Changeset attached 5.2.x r14917
2011-12-23 13:17 Dmitry Note Added: 0004313
2011-12-23 13:17 Dmitry Assigned To Dmitry => alex
2011-12-23 13:17 Dmitry Status needs testing => needs work
2011-12-23 10:36 alex Changeset attached 1.0.x r14911
2011-12-22 10:27 alex Note Added: 0004298
2011-12-22 05:46 alex Changeset attached 1.0.x r14902
2011-12-22 05:45 alex Changeset attached 5.2.x r14901
2011-12-21 11:17 alex Note Added: 0004294
2011-12-21 11:17 alex Assigned To alex => Dmitry
2011-12-21 11:17 alex Status needs work => needs testing
2011-12-21 11:14 alex Changeset attached 1.0.x r14900
2011-12-21 11:12 alex Changeset attached 5.2.x r14899
2011-12-20 14:39 Dmitry Note Added: 0004288
2011-12-20 14:39 Dmitry Assigned To Dmitry => alex
2011-12-20 14:39 Dmitry Status needs testing => needs work
2011-12-20 12:16 alex Note Added: 0004286
2011-12-20 12:01 alex Changeset attached 1.0.x r14894
2011-12-20 12:01 alex Changeset attached 5.2.x r14893
2011-12-20 10:25 alex Time Estimate Removed 11 =>
2011-12-20 10:25 alex Note Added: 0004284
2011-12-20 10:25 alex Assigned To alex => Dmitry
2011-12-20 10:25 alex Developer => alex
2011-12-20 10:25 alex Status needs work => needs testing
2011-12-20 10:25 alex Changeset attached 5.2.x r14892
2011-12-20 10:24 alex Changeset attached 5.2.x r14891
2011-12-20 10:24 alex Changeset attached 1.0.x r14890
2011-12-20 10:23 alex File Added: smart_filters_themes.patch
2011-12-20 10:23 alex File Added: smart_filters_modules.patch
2011-12-20 10:23 alex File Added: smart_filters_core.patch
2011-12-13 10:32 alex Note Added: 0004258
2011-12-13 09:13 alex Changeset attached 5.2.x r14865
2011-12-13 09:03 alex Changeset attached 1.0.x r14864
2011-10-22 05:27 alex Estimate Points => 3
2011-10-13 22:50 Dmitry Note Added: 0004047
2011-10-13 22:50 Dmitry Assigned To => alex
2011-10-13 22:50 Dmitry Status active => needs work
2011-10-12 12:56 alex Description Updated bug_revision_view_page.php?rev_id=872#r872
2011-10-10 03:46 alex Category Payment Gateways => Front End
2011-10-06 12:57 Dmitry Category General => Payment Gateways
2011-10-06 12:57 Dmitry Target Version 1.0.0 => 5.2.0
2011-10-06 12:57 Dmitry Project Modern-Store => In-Commerce
2011-09-30 12:04 Dmitry Time Estimate Added 11
2011-09-27 06:31 alex New Issue

Notes
(0004047)
Dmitry   
2011-10-13 22:50   
Some additional info:

1. Print List for filters should be able to print all or specified Filters individually.

2. Each Filter box should have it's own Form since can be located ANY where on the page.

3. Main Product list will have it's own Form and will collect and apply filters values from all loaded/printed Filter Forms.
(0004258)
alex   
2011-12-13 10:32   
1. put ListManager.urlParams into anchor of the page
2. add anchor listener, that would:
- parse anchor into set of params
- set params into ListManager
- reload list
- reload each registered filter (it's good, that each filter is a separate tpl)
3. example on how filtering parameters could look like:
- filters[Price][range]=10|50
- filters[ManufacturerId][picker]=|5|12|
(0004284)
alex   
2011-12-20 10:25   
Done.
(0004286)
alex   
2011-12-20 12:16   
Idea, how we can invert range slider: http://jsfiddle.net/GNaRY/1/
(0004288)
Dmitry   
2011-12-20 14:39   
TODO in this Task:

1. Can NOT use MaxValue in SQLs since it's Reserved word by MySQL

2. Make Filters not to refresh on selection, but use JS instead to update colors/css class. NOTE: this should work correctly on Refresh/Enter too. I guess we might want to do this an OPTION so there is a way to choose if Filters will refresh (might be useful in the future) or Stay as they are.

3. Get Price Filter inverted so it correctly returns values.

(0004294)
alex   
2011-12-21 11:17   
Fixed.
(0004298)
alex   
2011-12-22 10:27   
(edited on: 2011-12-29 12:45)
Idea by Dmitry:

Currently counters near each filter stay the same no matter what if filtered out by other filters. Maybe we should update filter counters of other filters, when each filter was changed.

When changing filter, then update counters in all other filters, but not in filter that was clicked upon.

(0004313)
Dmitry   
2011-12-23 13:17   
For some reason I can still see Filters with 0 counts and no Product when in category. Note that it's sub-category has products, but this immediate category one does not have any products so why do we see empty Filters?

http://screencast.com/t/uCgEnJs35gw
(0004321)
alex   
2011-12-27 04:58   
Done. Filter was hidden only, when filter itself has no options to choose from, but not when target list was empty.
(0004357)
Dmitry   
2011-12-29 18:15   
Please proceed with the following additions here:

1. Remove Show/Hide effect completely and instead make so when Filter is active it's highlighted Blue (different CSS) - it's more intuitive.


2. Make so "Show All" in grid would also Reset All applied filters if any


3. Add "Reset Filter" anchor (on image tag or something) - create some element with the right action/functionality which would reset that specific Filter.

#34278 - Create "Reset Filter" button - http://screencast.com/t/qBviNzr3q


4. Currently counters near each filter stay the same no matter what if filtered out by other filters. Maybe we should update filter counters of other filters, when each filter was changed.

As an optional system setting for filters add ability - When changing filter, then update counters in all other filters, but not in filter that was clicked upon.

NOTE: We have discussed this with Andrew and he agreed with it would be great to be able to have both options (update all counters across, or only for inactive filters). This can be a setting in the Config or pass to Tag which prints filters - which ever is easier.
(0004386)
alex   
2012-01-04 07:17   
Done
(0004424)
Dmitry   
2012-01-18 14:11   
Two additional issues are found:

1. Reset All not resetting the Counters - http://screencast.com/t/qKNQ9T4eOks7

2. Counters are not properly updated on change - http://screencast.com/t/zMqZd4paxSi

In the perfect world we'd like to see ALL Counters of all Filters to update automatically.
(0004426)
alex   
2012-01-20 08:04   
Reset All not resetting the Counters - http://screencast.com/t/qKNQ9T4eOks7
Done.
(0004427)
Dmitry   
2012-01-20 12:37   
Looks good so far!
(0004988)
alex   
2012-07-25 05:31   
Since 5.2.0 version was released.