guillefd Posted April 3, 2014 Report Posted April 3, 2014 Hi, I'd like to add invoice item details in the email template but doing it wrong, getting error Template parse error: Invalid for loop syntax. This is the code I´m adding to email template (invoice delivery - unpaid) Invoice #: {invoice.id_code} --------------------------------------------------------------- {% for item in invoice.line_items %} {item.description} | {item.qty} | {item.total} {% endfor %} --------------------------------------------------------------- Total: {invoice.total} What I need is to loop {invoice.line_items} and print tha vars I need. Thanks!
0 guillefd Posted April 3, 2014 Author Report Posted April 3, 2014 Sorry, it works. I´ve deleted a {for} line of other loop and was giving me error. Michael 1
Question
guillefd
Hi,
I'd like to add invoice item details in the email template but doing it wrong, getting error Template parse error: Invalid for loop syntax.
This is the code I´m adding to email template (invoice delivery - unpaid)
Invoice #: {invoice.id_code} --------------------------------------------------------------- {% for item in invoice.line_items %} {item.description} | {item.qty} | {item.total} {% endfor %} --------------------------------------------------------------- Total: {invoice.total}What I need is to loop {invoice.line_items} and print tha vars I need.
Thanks!
1 answer to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now