Access to config parameters in mjml mails
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Access to config parameters in mjml mails
Hello,
I am configuring a value like this in the TypoScript setup in TYPO3:
plugin.tx_aimeos.settings.client.html.common.sizes {
36 = 1020
38 = 1021
[shortened a bit...]
}
In the summary of the shop, I can properly access these as
$allSizes = $this->config( 'client/html/common/sizes', array());
But, when I use the same programming code inside the mjml file (which is transformed to PHP), then the array $allSizes is empty!
Is this a bug? What can I do?
Claudia
I am configuring a value like this in the TypoScript setup in TYPO3:
plugin.tx_aimeos.settings.client.html.common.sizes {
36 = 1020
38 = 1021
[shortened a bit...]
}
In the summary of the shop, I can properly access these as
$allSizes = $this->config( 'client/html/common/sizes', array());
But, when I use the same programming code inside the mjml file (which is transformed to PHP), then the array $allSizes is empty!
Is this a bug? What can I do?
Claudia
Re: Access to config parameters in mjml mails
No bug, if you add a frontend configuration (plugin.tx_aimeos....) it's not available in the scheduler tasks because TYPO3 keeps them separate. Either to add the config to the TSConfig field in the scheduler task too or you move the config to the PHP config file where it will be used everywhere.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Access to config parameters in mjml mails
The TS config field won't be used, when I call the task from the command line, if I remember correctly.
Which PHP config file should be used? config/client.php ?
Which PHP config file should be used? config/client.php ?
Re: Access to config parameters in mjml mails
Yes, ./config/client.php is the right place because is named "client/html/common/sizes"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Access to config parameters in mjml mails
Thank you.
BTW, I don't really like to have to put configuration in this file, which varies depending on the system (development, test, production). After deployment of a new version of the extension, this file needs to be replaced automatically by the correct file for the system.
BTW, I don't really like to have to put configuration in this file, which varies depending on the system (development, test, production). After deployment of a new version of the extension, this file needs to be replaced automatically by the correct file for the system.
Re: Access to config parameters in mjml mails
You can put your environment specific configuration in the AdditionalConfiguration.php and reference it in the Aimeos config files like for the database connection:
https://github.com/aimeos/aimeos-typo3/ ... php#L8-L17
https://github.com/aimeos/aimeos-typo3/ ... php#L8-L17
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
