{"id":25839679,"url":"https://github.com/netresearch/dhl-module-unified-tracking","last_synced_at":"2025-03-01T04:34:03.070Z","repository":{"id":56967615,"uuid":"251546751","full_name":"netresearch/dhl-module-unified-tracking","owner":"netresearch","description":"Magento2 module to consume the DHL group tracking API and provide it as a service.","archived":false,"fork":false,"pushed_at":"2025-02-25T14:46:33.000Z","size":129,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-25T15:41:31.288Z","etag":null,"topics":["gitlab-mirror"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netresearch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-31T08:44:02.000Z","updated_at":"2025-02-25T14:46:36.000Z","dependencies_parsed_at":"2025-02-18T13:37:08.780Z","dependency_job_id":null,"html_url":"https://github.com/netresearch/dhl-module-unified-tracking","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fdhl-module-unified-tracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fdhl-module-unified-tracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fdhl-module-unified-tracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fdhl-module-unified-tracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netresearch","download_url":"https://codeload.github.com/netresearch/dhl-module-unified-tracking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241317607,"owners_count":19943199,"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":["gitlab-mirror"],"created_at":"2025-03-01T04:34:02.613Z","updated_at":"2025-03-01T04:34:03.056Z","avatar_url":"https://github.com/netresearch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DHL Unified Tracking Extension\n\nThe DHL Unified Tracking extension offers an integration of the [Shipment Tracking - Unified\nAPI](https://developer.dhl/api-reference/shipment-tracking) into the Magento® 2 platform. \n\n## Description\n\nThis extension enables integrators to request tracking details for a given\nDHL shipment. The extension does not display tracking status and tracking history\non its own. It accepts a tracking number and will return the tracking details in a\nformat suitable for use in Magento® 2. The UI integration needs to be realized within\na carrier module or similar.\n\n## Requirements\n\n* PHP \u003e= 8.2\n* PHP Internationalization extension\n\n## Compatibility\n\n* Magento 2.4.6+\n\n## Installation Instructions\n\nInstall sources:\n\n    composer require dhl/module-unified-tracking\n\nEnable module:\n\n    ./bin/magento module:enable Dhl_UnifiedTracking\n    ./bin/magento setup:upgrade\n\nFlush cache and compile:\n\n    ./bin/magento cache:flush\n    ./bin/magento setup:di:compile\n\n## Uninstallation\n\nTo unregister the tracking module from the application, run the following command:\n\n    ./bin/magento module:uninstall Dhl_UnifiedTracking\n    composer update\n\n## Usage\n\nTracking details can be obtained from the web service by either enabling the carrier\nplugin or using the tracking service directly.\n \nThe web service allows to filter results by DHL divisions.\n\n### Carrier Plugin\n\nThe tracking extension comes with a plugin that can be enabled to replace a carrier's\noriginal `\\Magento\\Shipping\\Model\\Carrier\\AbstractCarrierOnline::getTrackingInfo` method.\n\n```xml\n\u003ctype name=\"Vendor\\Module\\Model\\Carrier\"\u003e\n    \u003cplugin name=\"dhlgw_get_tracking_info\" type=\"Dhl\\UnifiedTracking\\Plugin\\Carrier\\GetTrackingDetails\"/\u003e\n\u003c/type\u003e\n```\n\nThe request for tracking info will then be picked up by the tracking extension and\nreturn a result object ready to be processed by the `Magento_Shipping` core module.\n\n### Tracking Service\n\nThe tracking extension offers an integration point that can be used to request\ntracking details from the web service: `\\Dhl\\UnifiedTracking\\Api\\TrackingInfoProviderInterface::getTrackingDetails`.\n\nUsing the tracking service directly can be useful if the result needs to be modified\nbefore passing it to the `Magento_Shipping` core module.\n\n```php\n// \\Vendor\\Module\\Model\\Carrier::getTrackingInfo\n\npublic function getTrackingInfo($tracking)\n{\n    $result = $this-\u003etrackingInfoProvider-\u003egetTrackingDetails($tracking, $this-\u003egetCarrierCode());\n    \n    if ($result instanceof \\Magento\\Shipping\\Model\\Tracking\\Result\\Error) {\n        // create link to portal if web service returned an error\n        $statusData = [\n            'tracking' =\u003e $tracking,\n            'url' =\u003e 'https://trackntrace.carrier.com/?track=' . $tracking,\n        ];\n        $result = $this-\u003e_trackStatusFactory-\u003ecreate(['data' =\u003e $statusData]);\n    }\n\n    return $result;\n}\n```\n\n### Limit Web Service Results\n\nThe tracking web service is able to return results from across DHL divisions.\nIf the integration is only meant to request tracking details from a certain carrier\n(e.g. DHL Paket), then the web service results should be filtered by providing\na tracking configuration object via DI configuration:\n\n```xml\n\u003ctype name=\"Dhl\\UnifiedTracking\\Model\\Pipeline\\Stage\\SendRequestStage\"\u003e\n    \u003carguments\u003e\n        \u003cargument name=\"configurations\" xsi:type=\"array\"\u003e\n            \u003citem name=\"fooCarrierCode\" xsi:type=\"object\"\u003eVendor\\Foo\\Model\\TrackingConfiguration\u003c/item\u003e\n            \u003citem name=\"barCarrierCode\" xsi:type=\"object\"\u003eVendor\\Bar\\Model\\TrackingConfiguration\u003c/item\u003e\n        \u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/type\u003e\n```\n\nThe carrier code is the identifier of the Magento® carrier that the tracking number\nbelongs to. Compare\n\n* `\\Magento\\Sales\\Api\\Data\\TrackInterface::getTrackNumber`\n* `\\Magento\\Sales\\Api\\Data\\TrackInterface::getCarrierCode`\n\nSee [API docs](https://developer.dhl/api-reference/shipment-tracking#/default/get_shipments)\nfor a list of available service names.\n\n## Support\n\nIn case of questions or problems, please have a look at the\n[Support Portal (FAQ)](http://dhl.support.netresearch.de/) first.\n\nIf the issue cannot be resolved, you can contact the support team via the\n[Support Portal](http://dhl.support.netresearch.de/) or by sending an email\nto \u003cdhl.support@netresearch.de\u003e.\n\n## License\n\n[OSL - Open Software Licence 3.0](http://opensource.org/licenses/osl-3.0.php)\n\n## Copyright\n\n(c) 2021 DPDHL Group\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetresearch%2Fdhl-module-unified-tracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetresearch%2Fdhl-module-unified-tracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetresearch%2Fdhl-module-unified-tracking/lists"}