#LOCAL("Counter", 0) #LOCAL("MaxCreateableAttributes", #Shop.FeatureMaxValue.ProductTypeAttributes) #IF(#DEFINED(#OwnUserDefinedAttributeValues)) #LOOP(#OwnUserDefinedAttributeValues) #IF(#DEFINED(#Attribute.Type) AND (#Attribute.Type NE "PreDefString" AND #Attribute.Type NE "PreDefLocalizedString")) #SET("MaxCreateableAttributes", #CALCULATE(#MaxCreateableAttributes - 1)) #ENDIF #ENDLOOP #ENDIF #IF(#DEFINED(#InheritedUserDefinedAttributeValues)) #SET("MaxCreateableAttributes", #CALCULATE(#MaxCreateableAttributes - #COUNT(#InheritedUserDefinedAttributeValues))) #ENDIF
#BLOCK("WITH_FORM_ERROR",#FormError)
#IF(#FormError)

{InputError}

#IF(#OBJECT_EXISTS) {DoubleObject} #ELSIF(#FormErrors.Reason.FeatureMaxValueReached) {FeatureMaxValueReached} #ELSIF(#FormErrors.Reason.NoAlias) {ErrorNoAlias} #ELSIF(#FormErrors.Reason.AttributeValueExists) {AttributeValueExists} #ELSIF(#FormErrors.Reason.VariationCombinationExists) {AddedVariationCombinationExists} #ELSIF(#FormErrors.Reason.SubProductsCountFeatureLimitExceeded) {SubProductsCountFeatureLimitExceeded} #ELSIF(#FormErrors.Reason.AttributeDoesNotExist) {AttributeDoesNotExist} #ELSIF(#FormErrors.Reason.AttributeValueDoesNotExist) {AttributeValueDoesNotExist} #ELSIF(#FormErrors.Reason.TooManyVariations) {TooManyVariations} #ELSIF(#FormErrors.Reason.ProductAttributeExists) {ProductAttributeExists} #ELSE {PleaseCorrectErrors} #ENDIF
#REM #ENDREM #ENDIF #LOCAL("CanAddAttributes",1) #REM #ENDREM #IF(#DEFINED(#OwnUserDefinedAttributeValues) AND #Shop.FeatureMaxValue.ProductTypeAttributes <= #COUNT(#OwnUserDefinedAttributeValues)) #SET("CanAddAttributes",0) #ENDIF #REM #ENDREM #IF(#CanAddAttributes) #LOCAL("UsageCount", 0) #LOOP(#InheritedUserDefinedAttributeValues) #IF(#COUNT(#GREP(#VariationTypeValues, "Attribute.ID", #Attribute.ID))) #SET("UsageCount", #UsageCount + 1) #ENDIF #ENDLOOP #LOOP(#OwnUserDefinedAttributeValues) #IF(#COUNT(#GREP(#VariationTypeValues, "Attribute.ID", #Attribute.ID))) #SET("UsageCount", #UsageCount + 1) #ENDIF #ENDLOOP #IF(#UsageCount > 2) #SET("CanAddAttributes",0) #ENDIF #ENDLOCAL #ENDIF #IF(#Shop.FeatureCurrentValue.ProductTypes >= #Shop.FeatureMaxValue.ProductTypes)

{Notification}

{ProductTypesMaxFeatureValueReached}
{ProductTypesFeatureMaxValue}: #Shop.FeatureMaxValue.ProductTypes
{EditProductTypes} #INCLUDE("FeaturePromotion")
#REM #ENDREM #ENDIF #IF(#VARIATION_SKIPPED)

{VariationSkipped}

#ENDIF #IF(NOT #MaxCreateableAttributes)

{Notification}

{AttributesFeatureMaxValueReached}
{MaxAttributes}: #Shop.FeatureMaxValue.ProductTypeAttributes #INCLUDE("FeaturePromotion")

#REM #ENDREM #ENDIF
{NoProductTypesYet} {UnityManageProductTypesLink}
#IF(NOT #COUNT(#SubProducts))

{UnityCreateProductType}

{UnityProductTypeInfoText1}

{UnityProductTypeInfoText2}

#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDIF #IF(#COUNT(#SelectedVariations)) #ENDIF #LOCAL("CurrentProductTypeID",#Class.ID) #IF(NOT #COUNT(#SubProducts))

{ProductType}

#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ELSE #ENDIF #ENDLOCAL
#IF(#COUNT(#OwnUserDefinedAttributeValues) > 0) #REM #ENDREM

{UnityChooseProductTypeAttributeValues}

  1. {UnityProductTypeAttributeValuesInfoText1} {UnityProductTypeAttributeValuesInfoTextFooter}
  2. {UnityProductTypeAttributeValuesInfoText2}
  3. {UnityProductTypeAttributeValuesInfoText3}
#IF(#ShopHasMultipleLanguages)

{UnityProductTypeAttributesInfoTextTranslation}

#ENDIF #ELSE #REM #ENDREM

{UnityCreateProductTypeAttributes}

  1. {UnityProductTypeAttributeValuesInfoText1} {UnityProductTypeAttributesInfoTextFooter}
  2. {UnityProductTypeAttributesInfoText2}
  3. {UnityProductTypeAttributesInfoText3}
#IF(#ShopHasMultipleLanguages)

{UnityProductTypeAttributesInfoTextTranslation}

#ENDIF #ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #REM#ENDREM
#LOCAL("IncludeHeadline", 1) #LOCAL("MaxAttributesValue", #Shop.FeatureMaxValue.VariationAttributeValues) #LOOP(#InheritedUserDefinedAttributeValues) #IF(#Attribute.Type EQ "PreDefLocalizedString") #IF(#IncludeHeadline)

{UnityInheritedAttributesHeadline}

#SET("IncludeHeadline", 0) #ENDIF
#LOCAL("IsUsed", #COUNT(#GREP(#VariationTypeValues, "Attribute.ID", #Attribute.ID)))
{UnityAttributeName}
#Attribute.NameOrAlias
{UnityAttributeValues}
#LOOP(#Attribute.PreDefAttributes)
#Value #NameOrAlias
#REM #ENDREM
#REM #ENDREM #ENDLOOP #IF(NOT #COUNT(#Attribute.PreDefAttributes))
#REM #ENDREM
#REM #ENDREM #ENDIF
#IF(#COUNT(#Attribute.PreDefAttributes) < #MaxAttributesValue)
#REM #ENDREM
#REM #ENDREM #ENDIF
#REM #ENDREM
#REM #ENDREM #ENDLOCAL
#REM #ENDREM
#REM #ENDREM #SET("Counter", #Counter + 1) #ENDIF #ENDLOOP

{UnityOwnAttributesHeadline} #Class.Name

#REM#ENDREM #LOOP(#OwnUserDefinedAttributeValues) #IF(#Attribute.Type EQ "PreDefLocalizedString") #LOCAL("IsUsed", #COUNT(#GREP(#VariationTypeValues, "Attribute.ID", #Attribute.ID)))
{UnityAttributeName}
#Attribute.NameOrAlias
{UnityAttributeValues}
#LOOP(#Attribute.PreDefAttributes)
#IF(#DEFINED(#Value))#Value#ELSE#ValueOrAlias#ENDIF #NameOrAlias
#REM #ENDREM
#REM #ENDREM #ENDLOOP #IF(NOT #COUNT(#Attribute.PreDefAttributes))
#REM #ENDREM
#REM #ENDREM #ENDIF
#IF(#COUNT(#Attribute.PreDefAttributes) < #MaxAttributesValue)
#REM #ENDREM
#REM #ENDREM #ENDIF
#REM #ENDREM
#REM #ENDREM #ENDLOCAL #SET("Counter", #Counter + 1) #ENDIF #ENDLOOP #REM#ENDREM #IF(NOT #COUNT(#OwnUserDefinedAttributeValues))
{UnityAttributeName}
{UnityAttributeValues}
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #SET("Counter", #Counter + 1) #ENDIF
#ENDLOCAL #ENDLOCAL
#REM #ENDREM
#REM #ENDREM
#ENDLOCAL

{AddedNewAttribute}

{PleaseSelectDefaultAttributeValues}

#REM #ENDREM

{SelectProducts}

#IF(#COUNT(#SubProducts))

{SelectProductsInfo}

#ENDIF
#REM #ENDREM
0 {SelectedVariationCounter}
#ENDBLOCK
#LOCAL("UnityTooManyAttributeValues", #TRANSLATE("UnityTooManyAttributeValues")) #ENDLOCAL #REM #ENDREM #ENDLOCAL #ENDLOCAL