I have to make a template in the TinyButStrong language, but I have no access to the PHP side. I’m just able to modify my template and to upload it on my ERP.
Anyway, the PHP side is working well.
I tried to put an
if statement in my ODT template file, but when rendering it doesn’t work.
[if [tab.product_type]!=1; then ‘[tab.product_ref]’; else ‘0’; block=table:table-row]
I verified value of
tab.product_type, and the value is 0 or 1.
I tried many syntaxes, but none is working well. The only thing that it shows is:
Where did I make a mistake? I really don’t understand, because I tried many syntaxes and I still get this line.
Little update :
I saw that the “when” is more adapted to this usage.
I found a syntax but I’m still having bad results. I made this :
Anyway, it’s giving me lines where tab.product_type is 1.
Why ?? I really don’t understand how this language works…