AbanteCart Community
Shopping Cart Operations => Tips and Tricks => Topic started by: fdangelo on May 31, 2020, 10:34:21 PM
-
I would like to add the customerid to all emails that are sent out.
I can't seem to figure out how to modify the template.
Any suggestions would be appreciated.
Thanks.
-
To add additional data to email template, you should:
1. Add to php code variables with needed data. (Hooks, direct change)
2. Add variables to "Allowed Placeholders".
-
You can manually update AMail class from 1.2.17 branch (https://github.com/abantecart/abantecart-src/blob/1.2.17/public_html/core/lib/mail.php)
and create hooks.
For example:
public function onAMail_ProcessData($method, $params)
{
$that = &$this->baseObject;
if ($this->baseObject_method === 'setTemplate' && $params['text_id'] === 'admin_new_transaction_notify') {
$that->setPlaceholder('user_id', 'Jon');
}
}
-
I had the same question, thank you for answering
-
The short dev manual with example
https://abantecart.atlassian.net/wiki/spaces/DOC/pages/1763835905/Extend+email+templates