承接 deployecommerce/module-url-rewrite-import-export 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

deployecommerce/module-url-rewrite-import-export

Composer 安装命令:

composer require deployecommerce/module-url-rewrite-import-export

包简介

Export and import the url_rewrite table as CSV from the Magento admin.

README 文档

README

Export and import the Magento url_rewrite table as CSV from the admin, with safety backups.

What it does

  • Export — one click downloads the entire url_rewrite table as url_rewrite_YYYY_MM_DD_HHmmss.csv. CSV columns mirror the database columns exactly (read live from the schema, never hardcoded). Streamed row-by-row, so memory stays flat on large tables. No queues.
  • Import — upload a CSV previously exported by this tool. Before any row is written:
    • the CSV header is validated against the live database columns; an unknown column aborts the import;
    • a safety backup of the current table is always written to var/rewrites/url_rewrite_<timestamp>.csv;
    • if you did not export a backup through this tool first, you are warned.
  • Import options (admin-selectable, echoed back in the result for debug reports):
    • Import mode — Upsert / Skip duplicates / Fail on duplicate.
    • ID handling — Preserve url_rewrite_id from the CSV, or auto-assign new IDs.
    • Truncate — optional checkbox to empty the table first; requires an extra JS confirmation.
  • Result table — after import, shows rows in file / imported / skipped (duplicates) / failed, plus the exact options used.

Admin page: System → Tools → URL Rewrite Import / Export.

Install

This module ships as a standalone Composer package, deployecommerce/module-url-rewrite-import-export.

Via a VCS / Packagist repository (deploy)

composer require deployecommerce/module-url-rewrite-import-export:^1.0
bin/magento module:enable DeployEcommerce_UrlRewriteImportExport
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Via a local path repository (development)

Add a path repository pointing at this checkout and require it as @dev:

"repositories": {
    "local-url-rewrite-import-export": {
        "type": "path",
        "url": "packages/module-url-rewrite-import-export",
        "options": { "symlink": true }
    }
}
composer require deployecommerce/module-url-rewrite-import-export:@dev

In a Docker setup whose vendor/ is a named volume, the path-repo target must be visible inside the container — mount this checkout into the project, e.g. /path/to/module:/var/www/html/packages/module-url-rewrite-import-export.

league/csv:^9.28 is a hard dependency (declared in this module's composer.json) and is pulled in automatically by Composer.

Tests (PEST)

The framework-free service classes (HeaderValidator, FilenameGenerator) are unit-tested with PEST. The harness is isolated under tests/ with its own composer.json because Pest 2 ships PHPUnit 10, which conflicts with Magento's bundled PHPUnit 9 — keeping it separate avoids the clash and never boots Magento.

cd tests
composer install
./vendor/bin/pest

Database-touching classes (Exporter, Importer, BackupWriter) are integration territory and are intentionally out of the pure-unit harness.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固