-
-
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
Added new useful columns in products tab in category view #2713
Added new useful columns in products tab in category view #2713
Conversation
fixed conflict |
b6f72e7
to
f8a125c
Compare
My comments related to this PR are the following SOLVED SOLVED NOT SOLVED NOT SOLVED SOLVED |
This should be the Action column. $this->addColumn('action', [
'header' => Mage::helper('catalog')->__('Action'),
'width' => '50px',
'type' => 'action',
'getter' => 'getId',
'actions' => [
[
'caption' => Mage::helper('catalog')->__('Edit'),
'url' => [
'base' => 'adminhtml/catalog_product/edit',
'params' => [
'store' => $this->getRequest()->getParam('store'),
'popup' => 1
],
],
'field' => 'id',
'onclick' => 'popWin(this.href,\'_blank\',\'width=1024,height=750,resizable=1,scrollbars=1\');return false;',
],
],
'filter' => false,
'sortable' => false,
'index' => 'stores',
]); There is an issue after saving the product. The bellow window doesn't have the same behavior like the one for Associated Products. The window is not closing automatically and the [Close Window] button it is not working. The error in console is Uncaught TypeError: Cannot read properties of undefined (reading 'updateProduct')
at addProduct (1ae108f468e971e091309d629583f5aa/:133:44)
at 1ae108f468e971e091309d629583f5aa/:151:1 |
This change makes the Category Products grid having the same columns and format as the Related Products / Up-sells / Cross-sells grids.
I have updated this PR. Now the grid has the same format as those in Related Products / Up-sells / Cross-sells. The unsolved problem is still the editing action: 1 - Editing a product must be done in a new window, opened by clicking on the link and having the same behavior as when the associated products are edited. 2 - There must be 3 buttons in the window. After pressing the [Save] button, the window either closes automatically or by pressing the [Close Window] button, exactly the same behavior as when the associated products are edited. 3 - Editing a product should update the grid. For example, when the status of the product is changed by saving, the change does not occur in the grid. A click on other category then coming back to the initial category will make visible the changes. PS - I deleted some irrelevant posts. |
I don't like the opening of new windows because accessibility mandates that it has to be the user to decide if they want the same window, a new tab or a new window. but since it's already used in configurable products, I've reverted my change and implemented the popup parameter as requested by @addison74 to have the same behavior (and same window name) of the configurable products management page. since everything seems to be working fine and there were already quite some tests, if all workflows are green I'll merge it. |
I made the reload work yeah! so all of the points listed by @addison74 should be solved |
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.
I checked this PR and all my previous reported issues were resolved. Editing a product opens a new window, there are 3 buttons as in the case of associated products, if the status of the product is changed and the [Save] button is pressed, the status is immediately changed in the grid on the category page. The editing window closes automatically if the button is not pressed. I found no errors in the console. There have been similar paid or free versions in the past, but none offered what was implemented here.
@fballiano - thank you for completing this PR.
one more on the road to zero PRs, let's go! |
Description (*)
Sometimes when you work in the category view in backend it is necessary to edit a product. It was not possible to edit a product from the products tab in category. To improve usability in backend I added two more columns: One with the current product status and the other provides an edit link which opens the desired product in a popup.
Manual testing scenarios (*)