承接 bestit/ct-order-export-bundle 相关项目开发

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

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

bestit/ct-order-export-bundle

Composer 安装命令:

composer require bestit/ct-order-export-bundle

包简介

Symfony 3 Bundle to export commercetools orders based on templates and a virtual file system.

README 文档

README

Symfony 3 Bundle to export commercetools orders based on templates and a virtual file system.

Installation

An example implementation can be found in bestit/commercetools-order-export.

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require bestit/ct-order-export-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new \Oneup\FlysystemBundle\OneupFlysystemBundle(),
            new \BestIt\CtOrderExportBundle\BestItCtOrderExportBundle()
        );

        // ...
    }

    // ...
}

Step 3: Configuration of the bundle

best_it_ct_order_export:
    commercetools_client:  # Required
        id:                   ~ # Required
        secret:               ~ # Required
        project:              ~ # Required
        scope:                ~ # Required

    # Please provide the service id for your flysystem file system.
    filesystem:           ~ # Required
    
    # Please provide the service id for your logging service.
    logger:               logger
    orders:

        # Should we use a paginated list of orders (or is the result list changing by "itself")?
        with_pagination:      true

        # Add where clauses for orders: https://dev.commercetools.com/http-api-projects-orders.html#query-orders
        default_where:        []
        
        # Which template is used for the export of a single order?
        file_template:        detail.xml.twig

        # Provide an order field name or a format string for the date function enclosed with {{ and }}.
        name_scheme:          'order_{{id}}_{{YmdHis}}.xml'

Use the bundle

Shell-Command

The bundle provides you with a shell command:

$ php bin/console order-export:export-orders [-v|-vv|-vv] [-q]

Events

This bundle provides two events at this moment:

  1. order_export.preOrderExport: This event is triggered with an BestIt\CtOrderExportBundle\Event\PrepareOrderExportEvent-Instance. Use the API for the exportData to get more exportable data.
  2. order_export.postOrderExport: The event instance of type BestIt\CtOrderExportBundle\Event\FinishOrderExportEvent allows you to manpulate an order after the export.

Further Todos

  • Unittesting
  • Added a list template
  • Make heavier use of events

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固