#WITH_ERROR(#FormError)
#IF(#FormError)

{InputError}

{PleaseCorrectErrors}

#IF(#FormErrors.Reason.OBJECT_EXISTS)

{DoubleObject}

#ENDIF
#ENDIF #LOOP(#DeleteObjects)#ENDLOOP

{Notification}

{CouponConditionsInfo}


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

{Example}

{CouponConditionsExample}

{RelatedTopics}

#ENDWITH_ERROR