#BLOCK("WITH_FORM_ERROR",#FormError)
#IF(#FormError)

{InputError}

#IF(#FormErrors.Reason.CanNotDeleteDefault) {CanNotDeleteDefault} #ELSIF(#OBJECT_EXISTS) {ObjectExists} #ELSIF(#FormErrors.Reason.SETTINGS_INCOMPLETE) {ShippingSettingsIncomplete} #ELSIF(#FormErrors.Reason.ALIAS_MISSING) {ShippingMethodAliasMissing} #ELSE {PleaseCorrectErrors} #ENDIF

#ENDIF #IF(#DELETE)

{Warning}

{AcceptAction}

#LOOP(#DeleteObjects) #ENDLOOP
#ELSIF(#OVERWRITE)

{Warning}

{AcceptOverwriteAction1}
{AcceptOverwriteAction2}

#ELSE #IF(#FeatureMaxValueReached) #IF(#DEFINED(#FeatureName) AND #FeatureName EQ "ShippingMethods")

{Notification}

{CouldNotCreateShippingMethod}
{NoNewShippingMethod} #Shop.FeatureMaxValue.ShippingMethods #INCLUDE("FeaturePromotion")
#ELSE

{CouldNotCreateShippingMethod}

#ENDIF #ELSIF(#COUNT(#ShippingMethods) >= #Shop.FeatureMaxValue.ShippingMethods)

{Notification}

{FeatureMaxValueReached}
{FeatureMaxValueShippingMethods} #Shop.FeatureMaxValue.ShippingMethods #INCLUDE("FeaturePromotion")
#ENDIF #ENDIF #IF(#INVISIBLE_DEFAULT)

{DeactivateDefault}

#ENDIF #IF(#DELETE) #LOOP(#DeleteObjects) #ENDLOOP #ELSE #LOOP(#ShippingMethods) #ENDLOOP #LOCAL("NoNewEntry", #COUNT(#ShippingMethods) >= #Shop.FeatureMaxValue.ShippingMethods AND #Shop.FeatureMaxValue.ShippingMethods NE 1) #ENDLOCAL #ENDIF
{ShippingMethod} {Type} {IsDefault} {Position}
#NameOrAlias #ShippingType.NameOrAlias #Position
#NameOrAlias #IF(NOT #UsableAtStorefront AND NOT #OVERWRITE) {DoComplete} #ENDIF #IF(#Region) #ENDIF #ShippingType.NameOrAlias
#LOCAL("MyNewShippingTypeID",#NewShippingTypeID) #ENDLOCAL
#IF(#DELETE) #ELSIF(#OVERWRITE) #ELSE #IF(#COUNT(#ShippingMethods)) #ENDIF #ENDIF
#ENDBLOCK