#LOCAL("PaymentItems", 0)#LOCAL("ShippingItems", 0)#LOCAL("ProductItems", 0)
#LOOP(#CouponConditions)
#IF (#Type EQ "PAYMENT") #SET("PaymentItems", #PaymentItems + 1)
#ELSIF(#Type EQ "SHIPPING") #SET("ShippingItems", #ShippingItems + 1)
#ELSIF(#Type EQ "PRODUCT") #SET("ProductItems", #ProductItems + 1)
#ENDIF
#ENDLOOP
#LOCAL("CountProductItems",0)
|
#IF(#ProductItems == 0)
{ValidForAllProducts}
#ELSE
{ValidForProduct}
#ENDIF
|
#LOOP(#CouponConditions)
#IF(#Type EQ "PRODUCT")
|
#WITH(#ConditionObject)
#INCLUDE("INC-ProductIcon")
#ENDWITH
#ConditionObject.NameOrAlias
#SET("CountProductItems", #CountProductItems + 1)
#IF(#CountProductItems<#ProductItems) {or}#ENDIF
|
#ENDIF
#ENDLOOP
#IF(#ProductItems AND #Type EQ "PERCENT")
|
{UseCouponOnlyForSelectedProducts}
{yes}
{no}
|
#ENDIF
#ENDLOCAL
#LOCAL("CountShippingItems",0)
|
#IF(#ShippingItems == 0)
{WithAllShippingMethods}
#ELSE
{WithShippingMethod}
#ENDIF
|
#LOOP(#CouponConditions)
#IF(#Type EQ "SHIPPING")
|
#ConditionObject.NameOrAlias
#SET("CountShippingItems", #CountShippingItems + 1)
#IF(#CountShippingItems<#ShippingItems) {or}#ENDIF
|
#ENDIF
#ENDLOOP
#ENDLOCAL
#LOCAL("CountPaymentItems",0)
|
#IF(#PaymentItems == 0)
{WithAllPaymentMethods}
#ELSE
{WithPaymentMethod}
#ENDIF
|
#LOOP(#CouponConditions)
#IF(#Type EQ "PAYMENT")
|
#ConditionObject.NameOrAlias
#SET("CountPaymentItems", #CountPaymentItems + 1)
#IF(#CountPaymentItems<#PaymentItems) {or}#ENDIF
|
#ENDIF
#ENDLOOP
#ENDLOCAL
#ENDLOCAL#ENDLOCAL#ENDLOCAL
|
|