File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Catalog/Controller/Adminhtml/Product Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,17 @@ public function execute()
94
94
$ this ->_validateMassStatus ($ productIds , $ status );
95
95
$ this ->_objectManager ->get (\Magento \Catalog \Model \Product \Action::class)
96
96
->updateAttributes ($ productIds , ['status ' => $ status ], (int ) $ storeId );
97
- $ this ->messageManager ->addSuccess (__ ('A total of %1 record(s) have been updated. ' , count ($ productIds )));
97
+ $ this ->messageManager ->addSuccessMessage (
98
+ __ ('A total of %1 record(s) have been updated. ' , count ($ productIds ))
99
+ );
98
100
$ this ->_productPriceIndexerProcessor ->reindexList ($ productIds );
99
101
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
100
- $ this ->messageManager ->addError ($ e ->getMessage ());
102
+ $ this ->messageManager ->addErrorMessage ($ e ->getMessage ());
101
103
} catch (\Exception $ e ) {
102
- $ this ->_getSession ()->addException ($ e , __ ('Something went wrong while updating the product(s) status. ' ));
104
+ $ this ->messageManager ->addExceptionMessage (
105
+ $ e ,
106
+ __ ('Something went wrong while updating the product(s) status. ' )
107
+ );
103
108
}
104
109
105
110
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ protected function _addResetButton()
118
118
'reset ' ,
119
119
[
120
120
'label ' => __ ('Reset ' ),
121
- 'onclick ' => '$( \' edit_form \' ).reset() ' ,
121
+ 'onclick ' => 'location.reload(); ' ,
122
122
'class ' => 'scalable ' ,
123
123
'level ' => -1
124
124
]
You can’t perform that action at this time.
0 commit comments