10
votes
How to remove Delete option from massaction dropdown for specific user role in Magento2?
This can be done by creating a new class for MassActions:
<?php
namespace YourVendor\YourModule\Ui;
class MassAction extends \Magento\Ui\Component\MassAction
{
private $authorization;
...
10
votes
Accepted
Magento 2: MassAction Model LSD method delete()
LSD comes from load/save/delete. You should not call these methods inside loops.
But in this case, if you want to hide the dirt under the rug you can crete a new method in your class
private ...
8
votes
Invalid Method name delete in magento 2
you need to make change in di.xml file.
Replace this Line:
Company\Module\Model\ResourceModel\Test\Collection
Replace With this:
Company\Module\Model\ResourceModel\Test\Grid\Collection
In virtual ...
7
votes
Magento 2 massaction delete not working
Follow this process to implement Massaction delete
Namespace: Prince
Modulename: PincodeChecker
1) Use this code in UI Grid file(prince_pincodechecker_index.xml) before
<massaction name="...
7
votes
Accepted
Implement massactions in grid using ui_component magento2
Please try this. It's working fine for me.
<massaction name="listing_massaction">
<action name="delete">
<argument name="data" xsi:type="array">
&...
5
votes
Accepted
Solved - Adding Mass Delete Action to the Grid
You can also try this code.
Put below code into your grid.php
protected function _prepareMassaction()
{
$this->setMassactionIdField('id');
$this->getMassactionBlock()->...
5
votes
Accepted
Mass status in admingrid: Ui form
You can define your massaction in your uicomponent grid.
Inside listingToolbar> tag you can define <massaction> as many mass action you want.
<listingToolbar name="listing_top">
&...
5
votes
Add new mass action in order grid in magento 1.9
Flow below steps
Step:1
Create file Ar_Custom.xml at location app\etc\modules and add below code
<?xml version="1.0"?>
<config>
<modules>
<Ar_Custom>
...
5
votes
Adding url parameters to UI component mass action
1) Add class to attribute to action, and replace url item with urlPath:
<massaction name="listing_massaction" >
<action name="additem" class="Vendor\Module\Ui\Component\Action\AddItem"&...
3
votes
Accepted
Magento - Extending Mass Action Grid Filters ("Select All", "Select None") to Sales > Orders Grid
For the select all option you have to overwrite or copy app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php file with same structure in code/local folder
In the _prepareMassaction() method there ...
3
votes
Magento 2 massaction delete not working
You can try this code :-
public function execute()
{
$collection = $this->_filter->getCollection($this->_collectionFactory->create());
$recordDeleted = 0;
foreach ($...
3
votes
Mass delete action in one step not in loop magento 2
Took me a little while to get syntax right on this but you can do a delete from select
Not saying it fits your project but I think it is useful to know
https://github.com/DominicWatts/QuoteCleaner/...
3
votes
Mass Action not sending all data
I spent a lot of time trying to understand, what is wrong with my code, and why Magento does not send selected parameter with ids in POST request, when mass action is called. Later I found this "...
3
votes
Mass status in admingrid: Ui form
I have added tree-massactions and display area in grid structure. After that Mass actions works fine.
Here I have given grid structure for mass actions.
Hope it helps.
grid.xml for Massactions
<...
3
votes
Accepted
Magento 2 Mass shipment
First Made the ui component in your module
app\code\Vendor\Module\view\adminhtml\ui_component\sales_order_grid.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3....
2
votes
Magento 2: Select All option in Export Settings of Magento 2
Add a "select all" button beside "Reset Filter".
We need add plugin to class Magento\Backend\Block\Widget\Grid\Extended with getMainButtonsHtml method. As below
<config xmlns:xsi="http://www.w3....
2
votes
Magento 2: Select All option in Export Settings of Magento 2
Instead of creating a module, this can be achieved with the below Javascript. Run the below code in the browser CONSOLE to select all checkbox from the export section.
jQuery('.checkbox.admin__control-...
2
votes
Mass delete action in one step not in loop magento 2
try {
$categoriesIds = ['1','2','3'];
// use collection factory object of particular model
$catgoryObj = $this->_objectManager->get('MageArray\Gallery\Model\ResourceModel\Category\...
2
votes
Accepted
Need pass dynamic url param value in massAction url of ui-component grid
In my dataProvider class Package\Module\Ui\Component\RsvpDataProvider
in below segment:
<argument name="class" xsi:type="string">Package\Module\Ui\Component\RsvpDataProvider</argument>
...
2
votes
Accepted
Difference in approach for Mass Order Hold and Unhold
My money is on "The mass unhold was not refactored yet".
THe order management interface has the methods hold and unHold that work the same way.
They retrieve the order object, call the hold / unhold ...
2
votes
Accepted
Magento2 Add line separator in mass action list in sales order grid
I got one of the resolution of my question. In order to add line separator between mass action just like Amasty extension. person should add this action in listing_massaction tag in ui component file. ...
2
votes
Magento 2.3.0 : Admin panel mass status action change after not updated in custom module grid record
This issue is resolved in controller got to CustomModule/Videogallery/Controller/Adminhtml/videogallery/massstatus.php inside execute function
$post->setIsActive($status)->save();
change to
$...
2
votes
Accepted
Admin Grid "Select All" for mass action only sends the visible IDs
This is an upstream bug:
https://github.com/magento/magento2/issues/23110
Solution:
https://github.com/magento/magento2/pull/22704/commits/595a7a8f56571a5bd2753096bef9db27d46020ff
app/code/Magento/...
2
votes
Accepted
`Selected` field is missing from the post request for the product grid mass action
I had a look how the mass delete is done in the core and i saw that i missed some parts.
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
use Magento\Ui\Component\MassAction\Filter;
....
1
vote
Shipment grid custom mass action problem with UiComponentFactory::argumentsResolver()
I had this issue when I was referencing a ui component in an incorrectly named folder. I had it as view/adminhtml/uiComponent when it should be view/adminhtml/ui_component.
1
vote
Why the bulk update attributes is showing a blank red error message?
I just encountered this issue, which turned out to be caused by the Ebizmarts_MailChimp extension.
It has been fixed in a recent commit, but has yet to be added to a release. https://github.com/...
1
vote
Why the bulk update attributes is showing a blank red error message?
I guess that the issue have relation with the third-party extension that added this customized button "Grid Customization".
Try to disable this extension removing the XML file related to this one of ...
1
vote
Accepted
Resolved - Mass Action - Mass Database Update in Magento Grid
Everything is correct but at the time of saving data you set all request params in setId method. Please find below line and correct it.
$model->setId($id)->save();
Replace with below code
$...
1
vote
Solved - Adding Mass Delete Action to the Grid
You just need to add a function in your grid file in which you have written code for adding grid columns. I am providing you an example for mass action of catalog grid on admin panel. Please check ...
1
vote
Mass Action not sending all data
You can try the below code for new way to get the filter or selected collection from the list you selected from your grid.
<?php
namespace Namesapce\Modulename\Controller\Adminhtml\Module;
use ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
massaction × 149magento2 × 69
grid × 36
magento-1.9 × 23
adminhtml × 17
uicomponent × 16
order-grid × 14
magento-2.1 × 10
module × 10
product × 8
magento2.2 × 8
product-grid × 8
magento2.3 × 7
admin × 7
catalog × 7
controllers × 7
event-observer × 6
sales-order × 6
delete × 5
product-attribute × 4
magento-1.7 × 3
php × 3
attributes × 3
orders × 3
customer × 3