Jump to content

Email template extra variable [SOLVED]


Recommended Posts

Trying to add a new variable to email template (20% down payment for C.O.D.).

 

There is a {total_paid} variable at src/Adapter/MailTemplate/MailPreviewVariablesBuilder.php:

         

  '{total_paid}' => $this->locale->formatPrice($order->total_paid, $this->context->currency->iso_code)

I added
          

 '{total_paid_20}' => $this->locale->formatPrice($order->total_paid*0.2, $this->context->currency->iso_code)

but it has no effect. In fact if I remove the {total_paid} from this file, it is still showing the correct total in the email.

 

Where is this {total_paid} variable coming from, or how shall I achieve it, tho have the 20% of the amount in email template?

 

Edited by outlet.ee (see edit history)
Link to comment
Share on other sites

  • outlet.ee changed the title to Email template extra variable [SOLVED]

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