{"id":19463508,"url":"https://github.com/softwarepunt/php-delegate-b2b-dgxml","last_synced_at":"2025-02-25T12:52:37.712Z","repository":{"id":57055079,"uuid":"386644183","full_name":"SoftwarePunt/php-delegate-b2b-dgxml","owner":"SoftwarePunt","description":"PHP Library for working with Delegate Group B2B Catalog XML files (DGXML)","archived":false,"fork":false,"pushed_at":"2023-05-16T14:06:49.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T17:18:11.377Z","etag":null,"topics":["b2b","delegate","delegate-group","dgxml","php","xml"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoftwarePunt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-16T13:19:46.000Z","updated_at":"2024-04-01T02:47:41.000Z","dependencies_parsed_at":"2022-08-24T14:00:28.906Z","dependency_job_id":null,"html_url":"https://github.com/SoftwarePunt/php-delegate-b2b-dgxml","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fphp-delegate-b2b-dgxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fphp-delegate-b2b-dgxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fphp-delegate-b2b-dgxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fphp-delegate-b2b-dgxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftwarePunt","download_url":"https://codeload.github.com/SoftwarePunt/php-delegate-b2b-dgxml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240672823,"owners_count":19838930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b2b","delegate","delegate-group","dgxml","php","xml"],"created_at":"2024-11-10T18:10:59.578Z","updated_at":"2025-02-25T12:52:37.689Z","avatar_url":"https://github.com/SoftwarePunt.png","language":"PHP","readme":"# php-delegate-b2b-dgxml\n**PHP Library for working with Delegate Group B2B XML files (DGXML)**.\n\n[![PHPUnit](https://github.com/SoftwarePunt/php-delegate-b2b-dgxml/actions/workflows/phpunit.yml/badge.svg)](https://github.com/SoftwarePunt/php-delegate-b2b-dgxml/actions/workflows/phpunit.yml)\n[![Version](http://poser.pugx.org/softwarepunt/php-delegate-b2b-dgxml/version)](https://packagist.org/packages/softwarepunt/php-delegate-b2b-dgxml)\n\n👉 Currently only supports exporting the Article-/Price Catalog to Delegate DGXML format.\n\n## Installation\n### Requirements\n- PHP 8.0+\n  - with extension: dom, intl\n- [Composer](https://getcomposer.org/)\n\n### Setup\nUse Composer to add the package as a dependency to your project:\n\n```shell\ncomposer require softwarepunt/php-delegate-b2b-dgxml\n```\n\n## Usage\n\n### Creating a catalog\nUsing 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.\n\n📕 To best understand the structure of the catalog, refer to the official documentation (`ArticleCatalog DGXML 1.0_EN`).\n\nCreate a new `ProductCatalog` and assign items to it, then export it as XML:\n\n```php\n\u003c?php\n\nuse SoftwarePunt\\DGXML\\Documents\\ProductCatalog;\nuse SoftwarePunt\\DGXML\\Models\\Supplier;\nuse SoftwarePunt\\DGXML\\Models\\CatalogItem;\n\nrequire_once \"vendor/autoload.php\";\n\n$catalog = new ProductCatalog();\n\n$catalog-\u003eHeader-\u003eSupplier = new Supplier();\n$catalog-\u003eHeader-\u003eSupplier-\u003eGLN = \"9389229119441\";\n$catalog-\u003eHeader-\u003eSupplier-\u003eName = \"Backshop\";\n\n$item = new CatalogItem();\n$item-\u003eNumber = 1602;\n$item-\u003eName = \"Fuldkornsbrød\";\n$item-\u003ePrice-\u003ePurchase = 1.6;\n\n$catalog-\u003eItems[] = $item;\n\necho $catalog-\u003etoXml(); // \u003c?xml ...\n```\n\n### Notes\n- 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. \n- 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!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarepunt%2Fphp-delegate-b2b-dgxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftwarepunt%2Fphp-delegate-b2b-dgxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarepunt%2Fphp-delegate-b2b-dgxml/lists"}