-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified admin grid columns and added XML configuration #4225
Conversation
If we fix this problem, all the grids in the Backend will have to be revised. For example, the Manage Customers grid, we are allowed to input strings on the ID column for the From and To inputs. |
Yes, i know, but please not here in this PR. Better make small steps ... edit: Pls collect all the grids that need changes, make new issue and we move on. |
@sreichel - This is the grids list which have columns that allow searching strings and return zero as results. In order to check I had to change records in the database. I hope I did not miss anything. This PR solves only one of the issues Catalog > Products - Price column. Sales > Orders
Sales > Invoices
Sales > Shipments
Sales > Credit Memos
Sales > Tax > Manage Tax Zone & Rates
Catalog > Products
Catalog > Products > Edit Product > Related Products tab
Catalog > Products > Edit Product > Up-sells Products tab
Catalog > Products > Edit Product > Cross-sells Products tab
Catalog > Products > Edit Product > Product Tags tab
Catalog > Products > Edit Product > Associated Products tab (configurable)
Catalog > Categories > Category Products tab
Catalog > Search Terms
Promotions > Shopping Cart Price Rules
Newsletter > Newsletter Queue
Newsletter > Newsletter Problem Reports
Reports > Shopping Cart > Abandoned carts
Reports > Producs > Low stock
Reports > Search Terms
|
- makes all "entity_id" grid columns searchable "from" "to" - disallow/ignore non-numeric input on price/currency/range grid columns - removed useless "'sortable' => true"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I checked all the files and the result in the Backend.
I have identified a problem. In Catalog > Manage Products on the ID column it is now possible to search within a range. Similar grids are in Related Products, Up-sells, Cross-sells, Associate Products and many more, but which only remained with the search for an ID. Shouldn't they also be modified to be unified? |
Not all grids are covered yet (having another index then entity_id) If you find some, please list them. |
Grids with ID columns which should have From/To inputs.
Before moving on to the changes, I think we should evaluate these grids, because not all of them need changes, but those where the need to search within a rage is really helpful. |
Thanks. I'll do it step by step :) |
Please checkout latest commit. This was fixed in app/code/core/Mage/Adminhtml/Block/Widget/Grid.php |
Date-placeholder should have "From Date", or "dd/mm/yy" to make it perfect ... PR welcome. |
@addison74 thanks for your reviews. If you have improvements, please use githubs "suggestion"-feature or make a PR to my repo. For me, current version looks okay. If you want to remove/improve labels/placeholders, please create a PR. All these mini-changes takes a lot of time - wasting my time. |
Made placeholders invisible in legacy theme. |
app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Grid.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Ng Kiat Siong <[email protected]>
It is much better. |
# Conflicts: # .phpstan.dist.baseline.neon
@sreichel Conflict to resolve. |
# Conflicts: # .phpstan.dist.baseline.neon
Co-authored-by: Ng Kiat Siong <[email protected]>
Description (*)
entity_id
grid columns searchablefrom
to
"'sortable' => true"
return parent::renderCss() . ' a-right';
(*) Note: instead of having zero results, as suggested in mentioned issue, it will ignore input and return all products.
Fixed Issues (if relevant)
Update
The configuratuion for grid column default values went from php-property to XML config.
To customize see ...
app/code/core/Mage/Adminhtml/etc/config.xml