Shopping Cart Operations > Tips and Tricks
How to add customerid to email templates
(1/1)
fdangelo:
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.
dvagner:
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".
dvagner:
You can manually update AMail class from 1.2.17 branch
and create hooks.
For example:
--- Code: ---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');
}
}
--- End code ---
rollo202:
I had the same question, thank you for answering
Basara:
The short dev manual with example
https://abantecart.atlassian.net/wiki/spaces/DOC/pages/1763835905/Extend+email+templates
Navigation
[0] Message Index
Go to full version