#LOCAL("IsNewProduct",0) #IF(#INPUT.ViewAction EQ "UnityMBO-ViewNewProduct") #SET("IsNewProduct",1) #ENDIF #LOCAL("Alias",#Alias) #IF(NOT(#Alias))#SET("Alias",#SuggestNextNo(#Shop.Object,"Product"))#ENDIF

#IF(#IsNewProduct) {AddNewProduct} (#Alias) #ELSE {Products} #IF(#Name)#Name (#Alias)#ELSE#Alias#ENDIF #ENDIF

{General}

#REM #ENDREM
#REM #ENDREM #IF(#IsNewProduct) #ELSE #ENDIF #IF(#IsVariationProduct) #ELSE #ENDIF #IF(#OBJECT_EXISTS)

{InputError}

{ObjectExists}
#ELSIF(#FormError)
#IF(#COUNT(#FormErrors.Form.Save.Errors)) #LOOP(#FormErrors.Form.Save.Errors) #IF(#Reason EQ "SHORTURL_ALREADY_EXISTS")

{InputError}

{SHORTURL_ALREADY_EXISTS} #ELSIF(#Reason EQ "INVALID_CHARACTER")

{InputError}

{SHORTURL_INVALID_CHARACTER} #ENDIF #ENDLOOP #ELSE

{InputError}

{PleaseCorrectErrors} #ENDIF
#ENDIF #IF(#ShopProductsMaxedOut)

{MaxFeatureValueReached}

{FeatureMaxValue}: #Shop.FeatureMaxValue.Products[integer]
#ENDIF #REM #ENDREM #WITH_ERROR(#FormError)
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#SNIPPET("INC-WYSIWYG", "Name,InputName,Value,TranslationHead", "DescriptionTranslation", "Description", #Description, "{Description}")
#REM #ENDREM
{General} - optional
#REM #ENDREM
#REM #ENDREM #REM #ENDREM

{Price}

#REM #ENDREM
#REM #ENDREM
#LOCAL("Price", #Price) #IF(NOT #IsNewProduct) #SET("Price", #LISTPRICE(#Object, #ShopCurrencyID, #Shop.TaxModel, 1)) #ENDIF #ENDLOCAL
#REM #ENDREM
#ShopCurrencySymbol
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#LOCAL("ErrorItemNo", 0) #IF(#DEFINED(#Shop.TaxMethod) AND #GET("System.Child.PageTypes.Child.MBO.Child.DefaultTemplateTypes.Child.INC-".#Shop.TaxMethod.Alias[0]."-TaxClass-Select.ID")) #LOCAL("IncludeTemplate","INC-".#Shop.TaxMethod.Alias[0]."-TaxClass-Select") #INCLUDE(#IncludeTemplate) #ENDLOCAL #ELSE #INCLUDE("INC-TaxClass-Select")
#ENDIF #ENDLOCAL
#REM #ENDREM
#REM #ENDREM #REM #ENDREM
{Price} - optional
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#LOCAL("RefUnitID", #FUNCTION("ERROR_VALUE", #RefUnit, #RefUnit.ID)) #ENDLOCAL
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #MENU("Visibility")#INCLUDE(#Template)#ENDMENU #REM #ENDREM

{Shipping}

#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
{DaysFuzzy}
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#LOCAL("WeightUnitID", #FUNCTION("ERROR_VALUE", #WeightUnit, #WeightUnit.ID)) #ENDLOCAL
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #REM #ENDREM
{Shipping} - optional
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#IF(#IsNewProduct) #LOOP(#Shop.ShippingMethods)
#REM #ENDREM #ENDLOOP #ELSE #LOCAL("AllEnabled",0) #IF(NOT #COUNT(#ShippingMethods)) #SET("AllEnabled", 1) #ELSE #SET("AllEnabled", 0) #ENDIF #LOOP(#Shop.ShippingMethods)
#LOCAL("ShopMethodID",#ID) #LOCAL("IsElementOf",0) #LOOP(#ShippingMethods) #IF(#ShopMethodID NEQ #ID) #SET("IsElementOf",1) #ENDIF #ENDLOOP
#REM #ENDREM #ENDLOCAL #ENDLOCAL #ENDLOOP #ENDLOCAL #ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#IF(#Shop.DeliveryDimensionUnitInch)inch#ELSE#SPACE[0]{mm}#ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#IF(#Shop.DeliveryDimensionUnitInch)inch#ELSE#SPACE[0]{mm}#ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#IF(#Shop.DeliveryDimensionUnitInch)inch#ELSE#SPACE[0]{mm}#ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #REM #ENDREM
{Manufacturer} - optional
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#IF(#UPCEAN AND NOT #IsUPCEANValid)
{MsgInvalidProductCode}
#ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #REM #ENDREM
{Inventory} - optional
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #REM #ENDREM
{Legal} - optional
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM

{MaxFileSize}: #LOCAL("Size", #CALCULATE(#WebInterfaceConf.MAXCONTENTLENGTH / 1024)) #Size[float:1] #ENDLOCAL MByte #IF(#ProductDataSheet)
#ProductDataSheet #REM#IF(NOT #GET("SuperProduct.".#Attribute.Alias) OR #GET("SuperProduct.".#Attribute.Alias) NE #ProductDataSheet)#ENDREM #IF(#DEFINED(#_ProductDataSheet)) #ENDIF
#ENDIF
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM

{Image}

#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDWITH_ERROR
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDLOCAL #ENDLOCAL