Page 1 of 1

Language Support for Scheduler Task

Posted: 25 Oct 2019, 11:49
by stiller
hi there.

how is it possible to add language support to the scheduler task in order to attach different pdf-files to the payment mails.
conditions do not work here.

eg.

Code: Select all

client.html.email {
  payment.attachments {
  0 = AGB.pdf
   }
}
[globalVar = GP:L = 1] 
client.html.email {
  payment.attachments {
  0 = AGB_EN.pdf
   }
}
[global]
 
TYPO3 8.7.27
Aimeos 18.10.9

cheers

Re: Language Support for Scheduler Task

Posted: 26 Oct 2019, 08:44
by aimeos
No, that doesn't work because you don't have GET/POST available in scheduler tasks. Instead, you have to extend the HTML client for your needs: https://github.com/aimeos/ai-client-htm ... #L114-L116

Re: Language Support for Scheduler Task

Posted: 30 Oct 2019, 17:42
by stiller
thank you!
how would you query the language id at this point?

Re: Language Support for Scheduler Task

Posted: 31 Oct 2019, 08:57
by aimeos
Use

Code: Select all

$view->extAddressItem->getLanguageId()
if available or

Code: Select all

$view->extOrderBaseItem->getLocale()->getLanguageId()
for the language used during the checkout process. You can see the assigned objects to the view here:
https://github.com/aimeos/ai-client-htm ... #L255-L258

Re: Language Support for Scheduler Task

Posted: 07 Nov 2019, 23:56
by stiller
the latter has worked
thank you!