Language Support for Scheduler Task

Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
stiller
Posts: 47
Joined: 05 Mar 2016, 15:59

Language Support for Scheduler Task

Post by stiller » 25 Oct 2019, 11:49

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

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

Re: Language Support for Scheduler Task

Post by aimeos » 26 Oct 2019, 08:44

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 47
Joined: 05 Mar 2016, 15:59

Re: Language Support for Scheduler Task

Post by stiller » 30 Oct 2019, 17:42

thank you!
how would you query the language id at this point?

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

Re: Language Support for Scheduler Task

Post by aimeos » 31 Oct 2019, 08:57

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 47
Joined: 05 Mar 2016, 15:59

Re: Language Support for Scheduler Task

Post by stiller » 07 Nov 2019, 23:56

the latter has worked
thank you!

Post Reply