0

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 enter image description here

0

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 and MassStatus.php inside app\code\Magento\Catalog\Controller\Adminhtml\Product – Kingshuk Deb Apr 13 '17 at 7:38
  • Thank 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
0

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.