#LOCAL("CountLineItems", 0) #WITH(#LineItemContainer) #LOOP(#LineItems) #SET("CountLineItems", #CountLineItems+1) : #IF(#DEFINED(#Product)) #IF(#Name)#Name#ELSE#SKU#ENDIF #IF(#Product.SuperProduct)(#JOIN(", ",#Product.VariationTypeValues)#Attribute.NameOrAlias#SPACE[0]: #FORMAT(#GET("THIS.".#Attribute.Alias.".ValueOrAlias"),"html")#ENDJOIN)#ENDIF : #Quantity[float] #Product.OrderUnit.Name : #IF(#Product.PriceQuantity == 1)#BasePrice[money]#ELSE#FUNCTION("FORMAT",(#LineItemPrice + #Discount) / (#Quantity/#Product.PriceQuantity), "money")#ENDIF #LOCAL("TempOrderUnit","") #IF(#Product.OrderUnit.Abbreviation)#SET("TempOrderUnit",#Product.OrderUnit.Abbreviation) #ELSE#SET("TempOrderUnit",#Product.OrderUnit.NameOrAlias)#ENDIF #IF(#Product.PriceQuantity != 1)/ #Product.PriceQuantity #TempOrderUnit#ENDIF#IF(#Product.OrderUnit.Alias NE "piece" AND #Product.PriceQuantity == 1)/ #TempOrderUnit#ENDIF #ENDLOCAL : #ELSE #IF(#Name)#Name#ELSE#SKU#ENDIF : #Quantity[float] : #BasePrice[money] : #ENDIF : : #LineItemPrice[money] #ENDLOOP #ENDWITH #REM #LOOP(#SalesDiscounts) #INCLUDE("ContentLine") #ENDLOOP #LOOP(#Discounts) #INCLUDE("ContentLine") #ENDLOOP #IF(#Shipping)#WITH(#Shipping) #INCLUDE("ContentLine") #ENDWITH#ENDIF #IF(#Payment)#WITH(#Payment) #INCLUDE("ContentLine") #ENDWITH#ENDIF #IF(#DEFINED(#PaymentDiscount))#WITH(#PaymentDiscount) #INCLUDE("ContentLine") #ENDWITH#ENDIF #ENDREM #ENDLOCAL