E-mail template - dynamic variable - currency delete


I am generating pay by square img in e-mail template using dynamic variables but i need to delete EUR currency from variable {{{invoice_total}}} , otherwise it wont generate the image, could you please help me how to solve it?


Maybe <?php echo ($invoice->invoice_balance) ?> will help you here.

Tried that, but that doesnt work :frowning:
I cant use PHP there probably…
I thought maybe creating new variable without currency but I dont know where…

There’s three problems:

  • You have a dynamic variable, invoice_total with a bunch of curly brackets
  • how do these variables get transferred to your template (and turned into the dynamic variables
  • replace EUR with nothing in that invoice_total dynamic variable

First figure out question 2, maybe there’s a class somewhere that does that for you.

Do you know where I can find invoice_total variable? I tried to find it but I couldnt, also Im not a PHP expert…

I am trying to do this:


and I get error:

“errors”:{“amount”:[“The value ‘{{{invoice_total}}}’ is not valid.”]}}

because the value has EUR currency

<img src="https://api.QRGenerator.sk/by-square/pay/qr.png?iban=<?php echo ($invoice->user_iban) ?>&amount=<?php echo ($invoice->invoice_balance) ?>&currency=EUR&vs=<?php echo ($invoice->invoice_number) ?>&size=128&transparent=false" alt="QR kod" />

I did it like this in application\modules\mailer\views\invoice.php and it works :smiley:

This is a nice tweak you made, want to share all that needs to be done to enable this function? Thanks in advance! :grin:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.