Create smart filters functionality for item lists on Front-End

Components

Labels

Description

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

Context Information

None

Additional information (do not use)

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

Attachments

4
  • 27 Dec 2011, 04:05 PM
  • 20 Dec 2011, 04:23 PM
  • 20 Dec 2011, 04:23 PM
  • 20 Dec 2011, 04:23 PM

Activity

Alex July 25, 2012 at 10:31 AM

Since 5.2.0 version was released.

Dmitry Andrejev January 20, 2012 at 6:37 PM

Looks good so far!

Alex January 20, 2012 at 2:04 PM

[i]Reset All not resetting the Counters - http://screencast.com/t/qKNQ9T4eOks7/i
Done.

Dmitry Andrejev January 18, 2012 at 8:11 PM

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.

Alex January 4, 2012 at 1:17 PM

Done

Fixed

Details

Priority

Assignee

Reporter

Developer

Change Log Group

Added

Change Log Message

Patch Instructions

Patches must be submitted through Phabricator.

External issue ID

Story Points

Fix versions

Created September 27, 2011 at 11:31 AM
Updated December 30, 2024 at 2:23 AM
Resolved July 25, 2012 at 10:31 AM