Jump to content

How to add customer phone to review email template


jason14
 Share

Recommended Posts

Hello, I recently purchased a review module. Now I want to add the customer's phone number when the email is sent. But the tech support told me customizations are not covered by modules support, has to do by myself. 

So, I try to do it myself 

I find template variable code in LGMailer.php

 

        $template_vars = array(
            '{firstname}' => $order['firstname'],
            '{lastname}'  => $order['lastname'],
            '{storename}' => Configuration::get('PS_SHOP_NAME'),
            '{email}'     => $order['email'],
            '{id_order}'  => $order['id_order'],
            '{link}'      => $link,
            '{product_details}' => $products
        );

        return $template_vars;

 

as I want to add customer phone so modified it like this

 

         $template_vars = array(
            '{firstname}' => $order['firstname'],
            '{lastname}'  => $order['lastname'],
            '{storename}' => Configuration::get('PS_SHOP_NAME'),
            '{email}'     => $order['email'],
            '{phone_mobile}'     => $order['phone_mobile'],        (Added this line)
            '{id_order}'  => $order['id_order'],
            '{link}'      => $link,
            '{product_details}' => $products
        );

        return $template_vars;
    }

But It doesn't seem to work. Can anyone tell me what I am doing wrong? attached is the php file.

LGMailer.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More