Page 1 of 1

multi language email payment issue

Posted: 19 Jan 2018, 15:33
by antonlinderer
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.

Re: multi language email payment issue

Posted: 19 Jan 2018, 21:54
by aimeos
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?

Re: multi language email payment issue

Posted: 19 Jan 2018, 22:33
by antonlinderer
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

Re: multi language email payment issue

Posted: 19 Jan 2018, 22:53
by aimeos
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

Re: multi language email payment issue

Posted: 20 Jan 2018, 12:08
by antonlinderer
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!

Re: multi language email payment issue

Posted: 21 Jan 2018, 19:52
by aimeos
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?

Re: multi language email payment issue

Posted: 21 Jan 2018, 22:13
by antonlinderer
I have run "composer update" for 2017.10 without my modified template and it seems to be working now for multi languages!