Jump to content

Variables that do not appear in "payment email"


orhanatak

Recommended Posts

Hello;
I send the invoice as "payment accepted". I want to show the same table in the "order_conf" email in the "payment accepted" email. but the variables do not take value.
. . The photo below is theemail image. My english is very bad, sorry.

Thank you for your help.

null.png

Link to comment
Share on other sites

8 hours ago, PrestaServicePro said:

Hello.

1) What is the PS version?

2) Do you use any module for emails?

This is neither a version of Prestashop nor a module.
It writes the parameters PaymentModule.php to the email order_conf.
If it is necessary to write parameters from another order state to order_conf, it must be added to Mail.php.
That should be obvious to a professional.
Editing is not that simple, but it is not impossible.
Look at $ data = array (... in PaymentModule.php and at $ templateVars ['{in Mail.php.
However, it is better to solve such adjustments programmatically.
Just hookActionEmailSendBefore.

eg:

public function hookActionEmailSendBefore($params)
    {
    	$id_lang = $params['idLang'];
    	$template = $params['template'];
        $templateVars = $params['templateVars'];
        $templatePath = $params['templatePath'];
        $to = $params['to'];
        
        
        
        if ($template == 'payment') {
            $order = new Order(Tools::getValue['id_order']);
            $params['templateVars']['{date}'] =  $order->date_add;
            $params['templateVars']['{payment}'] =  $order->payment;
        }    
                                

    	return;
    }

 

Link to comment
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
×
×
  • Create New...