sanjeev-kr / magento2-export-products
magento 2 extension for export of products from product grid.
Package info
github.com/sanjeev-kr/magento2-export-products
Type:magento2-module
pkg:composer/sanjeev-kr/magento2-export-products
Requires
- php: >=8.0.0
This package is auto-updated.
Last update: 2026-04-12 02:42:59 UTC
README
Magento 2 admin extension that adds mass actions on the product grid to export only the products you select—either immediately as a download or asynchronously via the message queue (same pattern as the native Import/Export flow).
Requirements
- Magento 2.x with Magento_ImportExport and Magento_CatalogImportExport enabled
- PHP version compatible with your Magento installation
- For Export Product(s) (queued export): cron and message queue consumers must be running so jobs finish and you get the admin notification
Installation
Use Composer from your Magento project root when you can (updates and dependency tracking). Use manual copy if you are dropping the files in without Composer.
Package name (see composer.json): sanjeev-kr/magento2-export-products.
Magento’s root project already includes magento/magento-composer-installer, which installs magento2-module packages into vendor/ and wires them into the application—no manual app/code copy is needed when you install this way.
Option A: Install via Composer
Run these commands from the Magento installation root (the directory that contains bin/magento and the root composer.json).
From Packagist (or your default Composer repository)
If this package is published on Packagist (or another repository already configured in your project):
composer require sanjeev-kr/magento2-export-products
Option B: Manual copy (without Composer)
-
Place the extension under your Magento root:
app/code/Sanjeev/ExportProduct/ -
Ensure the folder contains
registration.php,composer.json,etc/,Controller/,Model/,Plugin/,view/, and related files.
Enable the module and deploy (Composer or manual)
From the Magento root:
bin/magento module:enable Sanjeev_ExportProduct bin/magento setup:upgrade
Production mode: regenerate DI and code as usual:
bin/magento setup:di:compile bin/magento setup:static-content:deploy -f
Clear cache:
bin/magento cache:flush
Admin permissions
Two ACL resources are registered (under Catalog and Stores → Configuration). Grant the appropriate role access to Mass Action Export Products so users can see and use the new mass actions:
- Go to System → Permissions → User Roles.
- Edit the role and open the Role Resources tab.
- Allow Mass Action Export Products under Catalog → Products (and the related config resource if you use scoped permissions).
Without this permission, the mass actions will not be available or the requests will be denied.
How to use
Open the product grid
In the admin, go to Catalog → Products.
Select products
Narrow the grid with filters so only the products you need are listed, then select them with checkboxes. Avoid Select all on an unfiltered grid or other patterns that select tens of thousands of products—see Important caveat: keep exports small above.
Choose a mass action
Open the Actions dropdown on the product grid toolbar. You will see:
| Mass action | What it does |
|---|---|
| Instant Export Product(s) | Runs the export in the current request. A CSV download starts when processing finishes. You will see a confirmation first warning that the action can slow down the site on large selections. |
| Export Product(s) | Sends the job to Magento’s import_export.export queue. A success message tells you the message was queued and reminds you that cron must be running. When the export completes, an admin notification indicates the file is ready. |
Where export files are stored
- Files are written under
var/import_export/export/(inside Magento’svardirectory). - Instant exports use a name like
catalog_product_export_YYYYMMDD_HHMMSS.csv. - Queued exports use the file name assigned by the export metadata (as shown on the standard export history / export UI).
To download or manage queued exports, use Magento’s usual System → Data Transfer → Export (or your equivalent path), consistent with the notification: “You can pick up your file at export main page.”
Operations checklist for queued export
For Export Product(s) to complete:
- Cron is configured and running (
cron:runor system crontab calling Magento’scron.php/cron:run). - Message queue consumers are running if your deployment requires them. Adobe Commerce / Magento documents the export consumer as
exportProcessor. You can list consumers withbin/magento queue:consumers:listand start this one withbin/magento queue:consumers:start exportProcessor(or run it under your process manager /cron_consumers_runnerconfiguration as documented for your version).
If jobs never finish, check var/log/ and ensure consumers and cron are active.
Uninstall (optional)
Disable and remove the module from app/code, then:
bin/magento module:disable Sanjeev_ExportProduct bin/magento setup:upgrade bin/magento cache:flush
(Adjust for your deployment; you may need setup:di:compile and setup:static-content:deploy -f again in production.)
Important caveat: keep exports small
Do not use these mass actions to export a very large number of products, and do not export your whole catalog in one go. Exporting thousands of rows (or “select all” across the full grid) puts heavy load on the database and PHP; Instant Export runs during an admin request and can noticeably slow down or stress the admin session and the website, while Export Product(s) can still strain the server and queue when the batch is huge.
Always use the product grid filters (attribute filters, SKU lists, categories, etc.) to narrow the list first, then export only a limited, intentional batch of products. For full-catalog or bulk data extracts, use approaches suited to large datasets (for example Magento’s standard export workflows, CLI, or dedicated integration jobs) and run them in a controlled or off-peak window—not this grid mass action across the entire catalog.
License
This project is licensed under the MIT License. See LICENSE.txt.
Author
Sanjeev Kumar