3brs/sylius-shipment-export-plugin

Sylius 的货运导出插件

安装: 655

依赖: 1

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 5

开放问题: 1

类型:sylius-plugin

This package is auto-updated.

Last update: 2024-08-30 01:32:25 UTC


README

货运导出插件

特性

  • 查看所有准备发货的订单列表(离线支付方式或完成非离线方式支付)
  • 一次性标记更多订单为已发货
  • 下载 CSV 以通过 Geis 提交批量货运
  • 下载 CSV 以通过捷克邮政提交批量货运
  • 您可以将模块轻松扩展以支持其他货运提供商的定制 CSV 格式

安装

  1. 运行 $ composer require 3brs/sylius-shipment-export-plugin
  2. 在您的 Kernel 中注册 \ThreeBRS\SyliusShipmentExportPlugin\ThreeBRSSyliusShipmentExportPlugin
  3. 在 routing.yml 中导入 @ThreeBRSSyliusShipmentExportPlugin/Resources/config/routing.yml
threebrs_shipment_export_plugin:
    resource: "@ThreeBRSSyliusShipmentExportPlugin/Resources/config/routing.yml"
    prefix: /admin

使用方法

您可以使用为 Geis 和捷克邮政预定义的 CSV 类型,或编写自己的导出器。

您的自定义导出器必须实现 ThreeBRS\SyliusShipmentExportPlugin\Model\ShipmentExporterInterface 并定义为服务。查看我们的示例实现。

预定义的货运提供商

  • 捷克邮政
ThreeBRS\SyliusShipmentExportPlugin\Model\CeskaPostaShipmentExporter:
    public: true
    arguments:
        $currencyConverter: '@sylius.currency_converter'    
    tags:
        - name: threebrs.shipment_exporter_type
          type: 'ceska_posta'
          label: 'Česká pošta'
  • Geis
ThreeBRS\SyliusShipmentExportPlugin\Model\GeisShipmentExporter:
    public: true
    arguments:
        $currencyConverter: '@sylius.currency_converter'
    tags:
        - name: threebrs.shipment_exporter_type
          type: 'geis'
          label: 'Geis'

开发

使用方法

  • /src 中开发您的插件
  • 查看 bin/ 以获取有用的命令

测试

在您的更改后,您必须确保测试仍在通过。

$ composer install
$ bin/phpstan.sh
$ bin/ecs.sh

许可证

此库受 MIT 许可证的约束。

致谢

3BRS 开发
manGoweb 分支。