Integrating DHL Service
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Integrating DHL Service
Hi,
Aimeos Version: "2023.04",
PHP Version : "8.0.11",
Laravel version: "^10.0"
I want to use DHL Delivery Service in my Aimeos project. I created a service provider named as DhlServiceProvider.php.
I also add provide in config/service.php file. This is my service.php file code:->
After that In adminpanel for my DHL service, I selected provider as DHLServiceProvider. I have added Log::debug in my provider to debug whether it is reaching there at time of checkout. But it isn't.
Can you please guide if I am missing anything?
Thankyou
Aimeos Version: "2023.04",
PHP Version : "8.0.11",
Laravel version: "^10.0"
I want to use DHL Delivery Service in my Aimeos project. I created a service provider named as DhlServiceProvider.php.
Code: Select all
public function push(iterable $orders): \Aimeos\Map
{
Log::debug('Push method started');
$responseMap = new \Aimeos\Map();
foreach ($orders as $order) {
if ($order instanceof OrderItem) {
Log::debug('Processing order: ' . $order->getId());
}
}
Log::debug('Push method finished');
return $responseMap;
}
Code: Select all
'services' => [
'shipping' => [
'dhl' => [
'decorator' => [
'Dhl' => ['Aimeos\\MShop\\Service\\Provider\\Delivery\\DhlServiceProvider']
]
],
],
],
Can you please guide if I am missing anything?
Thankyou
Re: Integrating DHL Service
This is unnecessary and won't have any effect.davin wrote: ↑08 Aug 2023, 13:28 I also add provide in config/service.php file. This is my service.php file code:->Code: Select all
'services' => [ 'shipping' => [ 'dhl' => [ 'decorator' => [ 'Dhl' => ['Aimeos\\MShop\\Service\\Provider\\Delivery\\DhlServiceProvider'] ] ], ], ],
The push() method is called when you execute the order/service/delivery job controller. For Laravel, it's:
Code: Select all
php artisan aimeos:jobs order/service/delivery
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Integrating DHL Service
Which method should I use then? I just need to hit an API to send orderdata to DHL when order is completed and delivery service is DHL?
Can you please let me know, what changes I need to do to achieve this?
Thanks
Can you please let me know, what changes I need to do to achieve this?
Thanks
Last edited by davin on 09 Aug 2023, 09:54, edited 1 time in total.
Re: Integrating DHL Service
Everything is correct, you only have to execute the mentioned job controller.
Aimeos uses async cronjobs for performance and reliability reasons instead of performing potentially long running tasks in user requests.
Aimeos uses async cronjobs for performance and reliability reasons instead of performing potentially long running tasks in user requests.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Integrating DHL Service
Okay, so I have to run following on cronjob where it will check for new orders and call API for each. Right?
Code: Select all
php artisan aimeos:jobs order/service/delivery
Re: Integrating DHL Service
Correct
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star