Hi magenticians I need the code of the module magento 2 which allows to add a text input when clicking on a mass action to enter a value like this example
-
Did you manage to fix this ? :) IF yes, would you share your code ? thnx – Attila Naghi Mar 27 '20 at 16:24
You can try this
$Ids = [];
$attributes = ['name' => 'product name'];
$storeId = 0; // for admin
$productMassAction = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Catalog\Model\Product\Action');
$productMassAction->updateAttributes($Ids, $attributes, $storeId);
---------- EDIT -------------
But for admin panel this gets called
execute() inside app\code\Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute\Save.php
-
For mass status change and mass delete you can use these files
MassDelete.php
andMassStatus.php
insideapp\code\Magento\Catalog\Controller\Adminhtml\Product
– Kingshuk Deb Apr 13 '17 at 7:38 -
1Thank you my friend, I have already managed to modify the value with this code but I am stuck in how I can add an input text to enter the new value , for example enter +20 and press apply, how to add input text and button – Creativity Group Apr 13 '17 at 7:59
-
To make the dynamic product name from the written value in the input – Creativity Group Apr 13 '17 at 8:24
I know this post might be closed and old but I am stuck to manage the XML file of MassAction to do exact what shown in Image. Can you please provide the XML File which allows me to access Text Input on MassAction?