datakick Posted March 21 Posted March 21 Hello everyone, I'd like to announce new upcoming feature, and as always ask for testing and reporting any and all issues, problems, and enhancement requests. This new functionality is names List Filters. You can test it by upgrading your store to list-filters branch (using core updater in custom targets) What this new functionality do? On every (filterable) lists in back office you will find a new icon in upper right corner: When you click on it, new section will appear. Here, you can define additional filters that will be applied to the list. The new filters are applied together with the standard filters from list header. But these new filters are slightly more powerful, because you can select operator - not, contains, starts with, between, any of Also, developers can define additional filters in AdminControllers that do not depend on list columns. For example, I have added new filter fields for Order list controller - (Customer - Email, Customer - First Name, Customer - Last Name). So you can filter order list by customer email, even though customer email is non one of list columns! We will be slowly adding more and more filter fields based on your suggestions. Let us know what you need!. This functionality is not 100% completed, but it's quite stable. I've been using it on few production servers without any issues for a few weeks now, so it should be safe for you to test it as well. We already have a few enhancement we want to implement. One of them is support for filter presets -- you will be able to save your filter settings, and easily switch between different presets. Now it's your turn. Please test and give feedback. I'm sure there is a lot to improve here. I'm very excited about this new feature, as I wanted to do have this for a few years now. And finally it's coming 🙂 3
datakick Posted March 21 Author Posted March 21 For developers here: you can test adding your own filter fields by modifying Admin***Controller classes, using new property filters_list. This property accepts the fields in the same format as property fields_list (which is used to define list columns) Example from AdminOrdersController: This is all that is needed to support filtering on customer email and names: https://github.com/thirtybees/thirtybees/blob/f59054511624de2131f86e4373604f827362468e/controllers/admin/AdminOrdersController.php#L214-L230 $this->filters_list = [ 'customer_email' => [ 'title' => $this->l('Customer - Email'), 'type' => 'text', 'filter_key' => 'c!email' ], 'customer_first_name' => [ 'title' => $this->l('Customer - First Name'), 'type' => 'text', 'filter_key' => 'c!firstname' ], 'customer_last_name' => [ 'title' => $this->l('Customer - Last Name'), 'type' => 'text', 'filter_key' => 'c!lastname' ], ];
DRMasterChief Posted Saturday at 12:36 PM Posted Saturday at 12:36 PM Interesting possibility, I don't have a use for it that I can think of yet, but as always, thanks for your work and i will test it!
datakick Posted Sunday at 10:22 AM Author Posted Sunday at 10:22 AM 21 hours ago, DRMasterChief said: Interesting possibility, I don't have a use for it that I can think of yet, but as always, thanks for your work and i will test it! There are a lot of use cases, but I guess it depends on what needs you have. For example, we have recently used this feature to find all products within certain profit margin range.
wakabayashi Posted Monday at 09:53 AM Posted Monday at 09:53 AM (edited) Thanks a lot for this new feature! It will be very helpful. Something similair was on my ToDo list as well 😏 I will have break in early april. Afterwards I will update our system to new PHP version and will also upgrade again to bleeding edge. Then I can test it with my live site 🤩 Edited Monday at 09:54 AM by wakabayashi
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now