News:

AbanteCart v1.4.2.1 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

How to add customerid to email templates

Started by fdangelo, May 31, 2020, 10:34:21 PM

Previous topic - Next topic

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

#2
You can manually update AMail class from 1.2.17 branch
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');
        }
    }

rollo202

I had the same question, thank you for answering


Forum Rules Code of conduct
AbanteCart.com 2010 -