定制 3brs/sylius-shipment-export-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

3brs/sylius-shipment-export-plugin

最新稳定版本:v1.0.0

Composer 安装命令:

composer require 3brs/sylius-shipment-export-plugin

包简介

Shipping export plugin for Sylius

README 文档

README

Shipment Export Plugin

Features

  • See list of all ready to ship orders (offline payment method or payment completed for non offline method)
  • Mark more orders at once as shipped
  • Download CSV for submitting batch shipments with Geis
  • Download CSV for submitting batch shipments with Czech Post
  • You can easily extend the module to support custom CSV format for other shipping providers

Installation

  1. Run composer require 3brs/sylius-shipment-export-plugin.
  2. Register ThreeBRS\SyliusShipmentExportPlugin\ThreeBRSSyliusShipmentExportPlugin::class => ['all' => true] in your config/bundles.php.
  3. Import routes in your config/routes.yaml
threebrs_sylius_shipment_export_plugin:
    resource: "@ThreeBRSSyliusShipmentExportPlugin/Resources/config/admin_routing.{yml,yaml}"
    prefix: '/%sylius_admin.path_name%'
  1. Import plugin configuration in your config/packages/_sylius.yaml
imports:
    - { resource: "@ThreeBRSSyliusShipmentExportPlugin/Resources/config/config.yaml" }

Usage

You can use predefined CSV type for shipment providers Geis and Czech Post) or write your own exporter.

Your custom exporter has to implement ThreeBRS\SyliusShipmentExportPlugin\Model\ShipmentExporterInterface and must be defined as service. Check out our sample implementations.

Predefined shipping providers:

  • Czech post
ThreeBRS\SyliusShipmentExportPlugin\Model\CeskaPostaShipmentExporter:
    public: true
    arguments:
        $currencyConverter: '@sylius.converter.currency'    
    tags:
        - name: threebrs.shipment_exporter_type
          type: 'ceska_posta'
          label: 'Česká pošta'
  • Geis
ThreeBRS\SyliusShipmentExportPlugin\Model\GeisShipmentExporter:
    public: true
    arguments:
        $currencyConverter: '@sylius.converter.currency'
    tags:
        - name: threebrs.shipment_exporter_type
          type: 'geis'
          label: 'Geis'

Shipping methods

Your shipping methods must have a code that matches the code of the shipping method in the exporter

  • for Geis see \ThreeBRS\SyliusShipmentExportPlugin\Model\GeisShipmentExporter::getShippingMethodsCodes
  • for Czech Post see \ThreeBRS\SyliusShipmentExportPlugin\Model\CeskaPostaShipmentExporter::getShippingMethodsCodes

Development

Usage

  • Develop your plugin in /src
  • See bin/ for useful commands

Testing

After your changes you must ensure that the tests are still passing.

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

License

This library is under the MIT license.

Credits

Developed by 3BRS
Forked from manGoweb.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-01