Jump to content

Customizing cheque.html email template in order to modify total_paid email variable

Marco Mauro

Recommended Posts

Hi all, 


This is the first time I use prestashop.
I would manipulate theemail variable {total_paid} in the 'cheque.html' template in order to extract the numerical value without the currency and changing the decimal symbol in dot. 


I have added a new email variable in /classes/PaymentModule.php like this:

'{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
'{total_paid_new}' => Tools::displayPrice($order->total_paid * 10, $this->context->currency, false),

I have just do some math on the {total_paid} variable. 


Then I have modified 'cheque.html' at line 111 like this:

<span style="color:#777">
Here are the bank details for your check:<br />
<span style="color:#333">
<strong>Amount:</strong></span> {total_paid}<br />
<strong>Amount new:</strong></span> {total_paid_new}<br />
<span style="color:#333"><strong>Payable to the order of:</strong></span> {cheque_name}<br />
<span style="color:#333"><strong>Please mail your check to:</strong></span> {cheque_address_html} 

But the I am not able to show the new variable in the email. Any suggestion ?

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...