I am trying to create a MassAction which accepts the Text Input and not Drop Down like Update Status which brings DropDown of Enable and Disable. Can someone please provide me correct XML file and PHP to get the action data?

Technically, I am trying to update Price of Multiple Product via MassAction with Formula. Please find attached Image for desire result.

enter image description here

New contributor
Mayur Patil is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

create app/code/Vendor/ModuleName/view/adminhtml/ui_component/product_listing.xml in your module add below code in it:

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
            <action name="status">
                    <label translate="true">Change status</label>
                        <action name="0">
                            <label translate="true">Enable in All Store Views</label>
                            <url path="catalog/product/massStatus"> //add your controller Path
                                <param name="status">1</param>
                        <action name="1">
                            <label translate="true">Disable in All Store Views</label>
                            <url path="catalog/product/massStatus">
                                <param name="status">2</param>
        <paging name="listing_paging"/>

You can add your action instead of <action name="status">.

  • Hi Rathod,Thank you for reply but this offers DropDown and I want a TextField as Input. In other words, I need to access the Price by entering in TextField upon MassAction where as your solution will show Dropdown with predefined options i.e. Enabled and Disable. – Mayur Patil Aug 14 at 8:00

Your Answer

Mayur Patil is a new contributor. Be nice, and check out our Code of Conduct.

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.