multi language email payment issue

Help for integrating the Laravel package
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!
antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

multi language email payment issue

Post by antonlinderer » 19 Jan 2018, 15:33

I have set up a multi language aimeos site. All goes well but when the user has finished ordering no payment confirmation email is sent although cron jobs are running for emails.
This is what I get in madmin_log table:

Error while trying to send payment e-mail for order ID "1" and status "5": Missing required parameters for [Route: aimeos_shop_detail] [URI: {locale}/detail/{d_prodid}/{d_name?}/{d_pos?}].

Any idea how to solve this? Thanks.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: multi language email payment issue

Post by aimeos » 19 Jan 2018, 21:54

I think the required language ID parameter for your configured route isn't passed here: https://github.com/aimeos/ai-client-htm ... d.php#L201

The best option might be to add it there into the "params" view helper and merge $this->params() with the $params array in the template: https://github.com/aimeos/ai-client-htm ... d.php#L179

Which Aimeos version do you use?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

Re: multi language email payment issue

Post by antonlinderer » 19 Jan 2018, 22:33

I have not been successful yet... will try again.
I am using following versions:
aimeos/ai-client-html 2017.10.7
aimeos/ai-controller-frontend 2017.10.5
aimeos/ai-controller-jobs 2017.10.4
aimeos/ai-laravel 2017.10.1
aimeos/ai-payments 2017.10.2
aimeos/ai-swiftmailer 2017.10.1
aimeos/aimeos-core 2017.10.11
aimeos/aimeos-laravel 2017.10.4
laravel/framework v5.5.32

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: multi language email payment issue

Post by aimeos » 19 Jan 2018, 22:53

We could add the necessary code to dev-master if you can try that version first. If it solves the problem, we will backport it to 2017.10
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

Re: multi language email payment issue

Post by antonlinderer » 20 Jan 2018, 12:08

Fixed it.
Changed it here: https://github.com/aimeos/ai-client-htm ... d.php#L201
from:
$params = array( 'd_prodid' => $product->getProductId(), 'd_name' => $product->getName( 'url' ) );
to:
$params = array( 'locale' => app()->getLocale(), 'd_prodid' => $product->getProductId(), 'd_name' => $product->getName( 'url' ) );

Thank you for your awesome support!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: multi language email payment issue

Post by aimeos » 21 Jan 2018, 19:52

Thanks a lot for your testing and your hint!
We've fixed this now in the dev-master, 2018.01 and 2017.10 branches, also for delivery and product watch related e-mails and for different site and currencies. Can you run "composer update" and check without your own modified template?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

Re: multi language email payment issue

Post by antonlinderer » 21 Jan 2018, 22:13

I have run "composer update" for 2017.10 without my modified template and it seems to be working now for multi languages!

Post Reply