Skip to main content
added 77 characters in body
Source Link

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>

For Magento 2.1

See Giel Berkers answer

Answering my own question.

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>

For Magento 2.1

See Giel Berkers answer

deleted 2 characters in body
Source Link

Answering my own question.

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/adminhtml/ui_component/product_listing.xmlapp/code/DigitalPianism/ProductExport/view/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>

Answering my own question.

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>

Answering my own question.

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>
Source Link

Answering my own question.

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/adminhtml/ui_component/product_listing.xml

<?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">
    <container name="listing_top">
        <massaction name="listing_massaction">
            <action name="export">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">export</item>
                        <item name="label" xsi:type="string" translate="true">Export to CSV</item>
                        <item name="url" xsi:type="string">productExport/productexport/exportCsv</item>
                    </item>
                </argument>
            </action>
        </massaction>
    </container>
</listing>