承接 softwarepunt/php-delegate-b2b-dgxml 相关项目开发

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

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

softwarepunt/php-delegate-b2b-dgxml

Composer 安装命令:

composer require softwarepunt/php-delegate-b2b-dgxml

包简介

PHP Library for working with Delegate Group B2B XML files (DGXML)

README 文档

README

PHP Library for working with Delegate Group B2B XML files (DGXML).

PHPUnit Version

👉 Currently only supports exporting the Article-/Price Catalog to Delegate DGXML format.

Installation

Requirements

  • PHP 8.0+
    • with extension: dom, intl
  • Composer

Setup

Use Composer to add the package as a dependency to your project:

composer require softwarepunt/php-delegate-b2b-dgxml

Usage

Creating a catalog

Using this library, you can build the catalog by simply assigning PHP objects and values. The structure and property names match the XML and documentation. Each property is type-hinted and contains phpdocs based on the official documentation.

📕 To best understand the structure of the catalog, refer to the official documentation (ArticleCatalog DGXML 1.0_EN).

Create a new ProductCatalog and assign items to it, then export it as XML:

<?php

use SoftwarePunt\DGXML\Documents\ProductCatalog;
use SoftwarePunt\DGXML\Models\Supplier;
use SoftwarePunt\DGXML\Models\CatalogItem;

require_once "vendor/autoload.php";

$catalog = new ProductCatalog();

$catalog->Header->Supplier = new Supplier();
$catalog->Header->Supplier->GLN = "9389229119441";
$catalog->Header->Supplier->Name = "Backshop";

$item = new CatalogItem();
$item->Number = 1602;
$item->Name = "Fuldkornsbrød";
$item->Price->Purchase = 1.6;

$catalog->Items[] = $item;

echo $catalog->toXml(); // <?xml ...

Notes

  • All text values are automatically transliterated to ASCII-only. This solves issues in the Delegate import process, but means special characters cannot be properly represented in the catalogs.
  • You must ensure GTIN / GTINOrderUnit item values can be parsed as a 64-bit integer, or the Delegate software will fail to import the catalog!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固