outlet.ee Posted April 14, 2022 Share Posted April 14, 2022 (edited) 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 April 14, 2022 by outlet.ee (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted April 14, 2022 Share Posted April 14, 2022 I think you should check in classes/PaymentModule.php 1 Link to comment Share on other sites More sharing options...
outlet.ee Posted April 14, 2022 Author Share Posted April 14, 2022 2 hours ago, endriu107 said: I think you should check in classes/PaymentModule.php It works, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now