Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: How to add customerid to email templates  (Read 927 times)

Offline fdangelo

  • Newbie
  • *
  • Posts: 16
  • Karma: +3/-1
    • View Profile
How to add customerid to email templates
« 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.

Offline dvagner

  • Core/UI Developer
  • Newbie
  • *
  • Posts: 44
  • Karma: +18/-0
    • View Profile
Re: How to add customerid to email templates
« Reply #1 on: June 01, 2020, 01:54:16 AM »
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".


Offline dvagner

  • Core/UI Developer
  • Newbie
  • *
  • Posts: 44
  • Karma: +18/-0
    • View Profile
Re: How to add customerid to email templates
« Reply #2 on: June 01, 2020, 09:54:36 AM »
You can manually update AMail class from 1.2.17 branch
and create hooks.
For example:
Code: [Select]
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');
        }
    }
« Last Edit: June 02, 2020, 02:01:22 AM by Basara »

Offline rollo202

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • viajes
Re: How to add customerid to email templates
« Reply #3 on: August 23, 2020, 02:12:00 PM »
I had the same question, thank you for answering

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4648
  • Karma: +237/-2
    • View Profile

Offline gav1202

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-1
  • https://findwritingservice.com/custom-assignment
    • View Profile
    • custom assignment
Re: How to add customerid to email templates
« Reply #5 on: September 04, 2020, 02:39:19 AM »
I think that creating such an custom assignment  is rather difficult, but it's worth spending a little time and you will definitely be able to do it, and after that this procedure will not take much of your time.
I think that creating custom assignment  is rather difficult, but it's worth spending a little time and you will definitely be able to do it, and after that newbielink:https://findwritingservice.com/custom-assignment [nonactive] this procedure will not take much of your time.

 

Powered by SMFPacks Social Login Mod