Posted on 20/11/2014 20:56:14
Hi Merethe,
So we have the template tag IsProduct, which value is true when the order line is of type Product or Fixed.
It's kinda weird that we don't have similar tags for discounts and taxes, like IsDiscount and IsTax. Could these be added?
This would make templates a lot easier to understand :)
BAD:
<!--@LoopStart(OrderLines)-->
<!--@If(Ecom:Order:OrderLine.Type=0 || Ecom:Order:OrderLine.Type=2)-->
... Product ...
<!--@EndIf-->
<!--@If(Ecom:Order:OrderLine.Type=1 || Ecom:Order:OrderLine.Type=3)-->
... Discount ...
<!--@EndIf-->
<!--@If(Ecom:Order:OrderLine.Type=4)-->
... Tax ...
<!--@EndIf-->
<!--@LoopEnd(OrderLines)-->
GOOD:
<!--@LoopStart(OrderLines)-->
<!--@If Defined(Ecom:Order:OrderLine.IsProduct)-->
... Product ...
<!--@EndIf-->
<!--@If Defined(Ecom:Order:OrderLine.IsDiscount)-->
... Discount ...
<!--@EndIf-->
<!--@If Defined(Ecom:Order:OrderLine.IsTax)-->
... Tax ...
<!--@EndIf-->
<!--@LoopEnd(OrderLines)-->