35
votes
Accepted
Magento 2 massaction delete not working
Try the following code:
<?php
namespace Vendor\ModuleName\Controller\Adminhtml\Module;
use Magento\Backend\App\Action\Context;
use Magento\Ui\Component\MassAction\Filter;
use Vendor\ModuleName\...
28
votes
Accepted
"Unknown columns" error when executing a mass action
It creates an issue because you didn't define $_idFieldName in your ResourceModel Collection
Please add this line in Vendor\MyModule\Model\ResourceModel\MyModel\Collectionfile.
/**
* @var ...
14
votes
Magento 2: Add a mass action block item for a UI Component grid
Please note that since Magento 2.1.x, the XML has slightly changed. You now have to use <listingToolbar/> instead of <container/>:
<listingToolbar name="listing_top">
<...
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
Best practice/scalable way to mass update tier prices?
The best way to update tier prices in bulk (as any batch of data in Magento) is to use direct database communication approach. In your case I would do the following:
Create a new temporary table into ...
5
votes
Accepted
Magento 2: Add a mass action block item for a UI Component grid
Answering my own question.
For Magento 2.0
The right way to add a mass action item to the Catalog grid in Magento is by creating the following file:
app/code/DigitalPianism/ProductExport/view/...
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>
...
4
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
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
Magento 2 how to pass order id's from sales order grid to my module controller
\Magento\Ui\Component\MassAction\Filter::getCollection is responsible for adding filter criteria to your collection and you can iterate through it to do some mass action. It will obtain \Magento\Ui\...
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
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 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 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 massaction delete not working
You can just try inside your controller file,
public function execute()
{
$deleteIds = $this->getRequest()->getParam('teams');
if (!is_array($deleteIds) || empty($deleteIds)...
2
votes
Accepted
got error on mass edit magento 2
Problem was with these two lines
<item name="provider" xsi:type="string">test_test_columns.test_test_columns.listing_top.bookmarks</item>
<item name="selectProvider" xsi:type="...
2
votes
Accepted
Mass Action in Order Grid
Problem resolved !
There was a mistake in my controller. I've chosen other type of router initialize (like my edits) but I forgot about modules container, so now my config.xml look like:
...
<...
2
votes
How to add 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
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
$...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
massaction × 147magento2 × 66
grid × 35
magento-1.9 × 23
adminhtml × 17
uicomponent × 16
order-grid × 12
magento-2.1 × 10
module × 10
product × 8
magento2.2 × 8
controllers × 8
product-grid × 8
magento2.3 × 7
admin × 7
catalog × 7
event-observer × 6
sales-order × 6
product-attribute × 5
delete × 5
magento-1.7 × 3
php × 3
attributes × 3
customer × 3
custom × 3