justbetter / magento2-product-grid-export
Add the export grid button to your product grid!
Package info
github.com/justbetter/magento2-product-grid-export
Type:magento2-module
pkg:composer/justbetter/magento2-product-grid-export
Requires
- indykoning/php-jsonl: ^1.0
- justbetter/magento2-core: ^1.0
Requires (Dev)
- bitexpert/phpstan-magento: ^0.42.0
- justbetter/magento2-coding-standard: ^1.0,>=1.0.2
- magento/framework: >=103.0.7
- magento/magento-coding-standard: >=40
- magento/module-backend: >=102.0.7
- magento/module-catalog: >=104.0.7
- magento/module-eav: >=102.1.7
- magento/module-store: >=101.1.7
- magento/module-ui: >=101.2.7
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
JustBetter - Magento 2 Product Grid Export
Adds the export button that other admin grids already have to the Magento 2 product grid.
Report Bug
·
Request Feature
Table of Contents
About The Package
This Magento 2 extension made by JustBetter adds the same export button that other admin grids like the order grid have to the product grid. The export is an exact replica of the grid you see: the same columns, filters, keyword search and selection.
Built With
Contributors
Thanks to all the people who have contributed to this project:
Getting Started
Installation
-
Install via Composer
composer require justbetter/magento2-product-grid-export
Composer also installs the dependencies justbetter/magento2-core (
JustBetter_Core) and indykoning/php-jsonl. -
Enable the modules
bin/magento module:enable JustBetter_Core JustBetter_ProductGridExport
-
Run setup upgrade
bin/magento setup:upgrade
-
In production mode, compile the dependency injection configuration
bin/magento setup:di:compile
Features
- Export button on the admin product grid, next to the "Columns" dropdown
- Four export formats: CSV, Excel XML, Excel XLS and JSONL
- Exports exactly what the grid shows
- Only the visible columns, in the order of your saved grid view
- Active filters and keyword search
- The selected products, a single page or all products ("Select All")
- Readable values instead of internal IDs
- Select and multiselect attributes are exported as their option labels, e.g.
quantity_and_stock_statusas "In Stock" / "Out of Stock" - Attribute sets and websites are exported by name
- Select and multiselect attributes are exported as their option labels, e.g.
- Suitable for large catalogs: products are loaded in batches of 200, and CSV and JSONL exports are streamed to the browser while they are generated
Export formats
| Format | File | Description |
|---|---|---|
| CSV | export.csv |
A header row with the column labels, followed by one row per product. Streamed to the browser while it is generated. |
| Excel XML | export.xml |
Excel 2003 XML spreadsheet (SpreadsheetML). Generated as a file first, then downloaded. |
| Excel XLS | export.xls |
The same SpreadsheetML output as Excel XML with an .xls extension, not a binary Excel file. Generated as a file first, then downloaded. |
| JSONL | export.jsonl |
One JSON object per product per line, keyed by column code. Multi-value columns such as websites stay arrays. Streamed to the browser while it is generated. |
In CSV, Excel XML and Excel XLS, multi-value columns are joined into a single comma-separated value.
Because CSV and JSONL exports are streamed, large catalogs can be exported without running into memory or time limits.
Usage
After installation the "Export" button is shown next to the "Columns" dropdown on the product grid (Catalog > Products).
- Set up the grid the way you want the export to look: pick the columns, apply filters or search by keyword.
- Select the products you want to export: a couple of products, a single page or all products with "Select All".
- Click "Export", choose a format and click "Export" again to download the file.
Contributing
Please read our Contributing Guide for details on the process for submitting pull requests.
Development:
# Install dependencies composer install # Run static analysis (PHPStan) composer analyse # Fix and check the code style (PHPCS, Magento Coding Standard) composer codestyle
For security vulnerabilities, please see our Security Policy.
License
Distributed under the MIT License. Please see License File for more information.
