Custom delivery provider process() not called
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Custom delivery provider process() not called
Laravel framework version: 10.13.5
Aimeos Laravel version: ~2023.04
PHP Version: 8.2.7
Environment: Linux
Hello, the process() method in my custom provider is not being called.
I have this cronjob set (with my own artisan and PHP paths of course, I'm sure it's executing properly because I receive emails):
* * * * * php /path/to/artisan aimeos:jobs "order/export/csv order/email/delivery order/email/payment order/email/voucher order/service/delivery subscription/export/csv customer/email/account"
This is the cut version of my provider:
Currently it should create a log.txt in the /public when directory when it's called with the order object, but it's not working.
It should work when order/service/delivery is called right? I'm calling the job manually, but process() doesn't seem to get triggered.
Aimeos Laravel version: ~2023.04
PHP Version: 8.2.7
Environment: Linux
Hello, the process() method in my custom provider is not being called.
I have this cronjob set (with my own artisan and PHP paths of course, I'm sure it's executing properly because I receive emails):
* * * * * php /path/to/artisan aimeos:jobs "order/export/csv order/email/delivery order/email/payment order/email/voucher order/service/delivery subscription/export/csv customer/email/account"
This is the cut version of my provider:
Code: Select all
<?php
namespace Aimeos\MShop\Service\Provider\Delivery;
class MyProvider
extends \Aimeos\MShop\Service\Provider\Delivery\Base
implements \Aimeos\MShop\Service\Provider\Delivery\Iface
{
/**
* Sends the order details to the ERP system for further processing.
*
* @param \Aimeos\MShop\Order\Item\Iface $order Order invoice object to process
*/
public function process( \Aimeos\MShop\Order\Item\Iface $order ) : \Aimeos\MShop\Order\Item\Iface
{
file_put_contents( 'log.txt', print_r( $order, true ) );
return $order;
}
}
It should work when order/service/delivery is called right? I'm calling the job manually, but process() doesn't seem to get triggered.
Re: Custom delivery provider process() not called
The method has been renamed in 2023.04 to push():
https://github.com/aimeos/aimeos-core/c ... 01b82ced85
https://github.com/aimeos/aimeos-core/c ... 01b82ced85
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: Custom delivery provider process() not called
I still can't get it to create a log file from the push() method:
Code: Select all
namespace Aimeos\MShop\Service\Provider\Delivery;
class MyProvider
extends \Aimeos\MShop\Service\Provider\Delivery\Base
implements \Aimeos\MShop\Service\Provider\Delivery\Iface
{
public function push( iterable $orders ) : \Aimeos\Map
{
file_put_contents( 'log-push.txt', 'test' );
return map( $orders )->setStatusDelivery( \Aimeos\MShop\Order\Item\Base::STAT_PENDING );
}
}
Re: Custom delivery provider process() not called
Pre-requisites that anything is executed:
- A delivery option with your provider set up in the admin backend
- An order with that delivery option and payment status of "authorized" or "received"
See: https://github.com/aimeos/ai-controller ... #L270-L305
- A delivery option with your provider set up in the admin backend
- An order with that delivery option and payment status of "authorized" or "received"
See: https://github.com/aimeos/ai-controller ... #L270-L305
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