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

Maintainers

Package info

github.com/helloimdeadcat/ExportForMagmi

Type:magento2-module

pkg:composer/helloimdeadcat/module-export-for-magmi

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-07-11 13:45 UTC

This package is auto-updated.

Last update: 2026-07-11 13:51:26 UTC


README

Latest Stable Version License PHP Version

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 group stagem) 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

  1. Copy the module to app/code/Stagem/ExportForMagmi
  2. Run:
bin/magento module:enable Stagem_ExportForMagmi
bin/magento setup:upgrade
bin/magento cache:flush

Usage

  1. Open Stagem → Export for Magmi in the Magento admin panel
  2. Create an export profile: title, store views (multiselect), attributes, and product conditions
  3. Optionally enable Scheduled Export and set a cron expression (e.g. 0 2 * * *)
  4. Click Run Export or wait for the cron job
  5. 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 remains Stagem_ExportForMagmi / Stagem\ExportForMagmi.

To submit or update the package index after a new release:

  1. Push a semver git tag (e.g. v1.0.0)
  2. 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

helloimdeadcatgithub.com/helloimdeadcat

Based on the original module by Serhii Popov (MIT, 2022).