Legend of liquid array for Developing Email Template

@Mark


@Doronto I don’t understand, please can you explain to me in the screenshot

It looks like you don’t understand that you’ll have to replace the code variables in English with the ones in Portuguese (minding upper and lowercase!). E.g. you write ‘Saldo devedor’ but that isn’t mentioned on the invoice, ‘Saldo de conta’ is, so you should write ‘Saldo de conta’ i.s.o. ‘Saldo devedor’.

Never mind, here are the code variables you can use in the Portuguese email template:
{{ recipient.name }}
{{ fields[“NĂșmero da Fatura”] }}
{{ fields[“Data da fatura”] }}
{{ fields[“Data de Vencimento”] }}
{{ table.totals[“Total”] }}
{{ table.totals[“Saldo de conta”] }}

@Mark check here my problem is when the language changes from english to portuguese only the error appears in the balance due it shows zero but in english it is correct



Of course it is 'cos in the definition of the variables in the top part there’s ‘balance_due’: that code means that if there’s no balance due (null) then RM 0.00 is the output, and if there is then it’s the value of the variable defined as (in English) ‘balance_due’.

I would delete the entire top part and use/insert the code variables in my previous post. (BTW, only the variables between the [ ] need to be translated, nothing else, 'cos I see you translated ‘fields’ as ‘campos’).

@Mark thank you very much now it works

1 Like

@Mark please help me for payslip, I tried with the same code but it didn’t work

I don’t use payslips but I guess the Liquid code variables are the same for all forms. BTW, the topic here is Email Template, not payslip so you should create a new post and indicate what you’ve tried so far and what the problem is.

@Mark I mean, I need a code for the payslip email template

Imo you really should hire a programmer.
Learning to program yourself is an alternative but as with learning most things, it involves signifiant time and commitment.