helloimdeadcat/module-export-for-magmi
Composer 安装命令:
composer require helloimdeadcat/module-export-for-magmi
包简介
Magento 2 module for exporting product catalog data to Magmi-compatible CSV files with multi-store support, cron scheduling, and REST API
关键字:
README 文档
README
Magento 2 module for exporting product catalog data to CSV files compatible with Magmi.
Features
- Admin UI for creating and managing export profiles
- Product filtering via catalog rule conditions
- Configurable attribute selection per export
- Multi-store export (comma-separated store view IDs, one CSV row per store)
- Manual, queued, and per-profile cron scheduled export execution
- Parallel run protection via file lock (
var/export_for_magmi/locks/) - Empty collection warning when no products match conditions
- CSV files stored in
pub/media/stagem/export-for-magmi/ - UI Component files grid (download / delete)
- REST API for external export trigger
Requirements
- Magento 2.4+
- PHP 8.1+
- Module
Stagem_CronGroup(cron groupstagem) or an equivalent custom cron group
Installation
Composer (recommended)
composer require helloimdeadcat/module-export-for-magmi bin/magento module:enable Stagem_ExportForMagmi bin/magento setup:upgrade bin/magento cache:flush
Manual
- Copy the module to
app/code/Stagem/ExportForMagmi - Run:
bin/magento module:enable Stagem_ExportForMagmi bin/magento setup:upgrade bin/magento cache:flush
Usage
- Open Stagem → Export for Magmi in the Magento admin panel
- Create an export profile: title, store views (multiselect), attributes, and product conditions
- Optionally enable Scheduled Export and set a cron expression (e.g.
0 2 * * *) - Click Run Export or wait for the cron job
- Download or delete CSV files from the Export Files grid on the edit page
REST API
Requires an integration or admin token with ACL Stagem_ExportForMagmi::export_execute.
POST /rest/V1/export-for-magmi/:exportId/execute POST /rest/V1/export-for-magmi/:exportId/queue
Example:
curl -X POST "https://your-store.test/rest/V1/export-for-magmi/1/execute" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json"
Architecture
| Class | Responsibility |
|---|---|
Model/Config |
Constants, store ID parsing, path helpers |
Api/ExportRunnerInterface |
Queue and execute export |
Api/ExportProcessorInterface |
Collection preparation and CSV writing |
Model/ExportRunner |
Orchestration, lock, warnings, state flags |
Model/Export/LockManager |
File-based parallel run protection |
Model/ExportScheduler |
Per-profile cron expression evaluation |
Model/ExportManagement |
REST API facade |
Model/Files/Scanner |
Filesystem scan for UI files listing |
Cron/Export |
Queued and scheduled export processing |
Cron
| Setting | Value |
|---|---|
| Job code | stagem_export_for_magmi |
| Cron group | stagem |
| Global schedule | * * * * * (every minute) |
| Per-profile schedule | cron_expression field on export profile |
Testing
composer install
composer test
Unit tests cover ExportRunner, ExportRepository, scheduler, and config/helper logic.
Packagist
This package is published on Packagist as helloimdeadcat/module-export-for-magmi.
Note: The Composer package vendor is
helloimdeadcat, but the Magento module namespace remainsStagem_ExportForMagmi/Stagem\ExportForMagmi.
To submit or update the package index after a new release:
- Push a semver git tag (e.g.
v1.0.0) - If auto-update is not configured, click Update on the Packagist package page or set up a GitHub webhook
Changelog
See CHANGELOG.md.
License
MIT — see LICENSE.
Author
helloimdeadcat — github.com/helloimdeadcat
Based on the original module by Serhii Popov (MIT, 2022).
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-11