If Statement In Invoice And Packing Slip

I am sure this is super simple, but so is my brain. :)

On the invoice and packing slip templates, I would like the QUANTITY variable to be formatted in BOLD and RED if it is greater than 1.

The variable is p.amount

Lil' Help?


If I understand you correctly, go to the Products table tab and change Qty value from

{{ p.amount }}


{{ p.amount }}

Do not forget to switch WYSIWYG editor to the source code mode

Thanks so much. To simplify a bit, let's just look at:

{% if p.amount> 1 %}color: red{% endif %}">{{ p.amount }}

I have switched to NO WYSIWYG editor and it still returns this error:

Error Unexpected character "&" at line 1.

It also changes the code to:

{{ p.amount }}

It seems to not like the > greater than symbol. WTH?

Sorry....last message was confusing. Forget the code simplification reference. Using the code you offered, the error is still there.

The example works for me on the clean installation. Try to use WYSIWYG, but switch it to the source code mode ( < > )