#REM
Parameters:
#SNIPPET.Head ... Title/label for input field
#SNIPPET.AddressPrefix ... Prefix for the current address (BillingAddress_, ShippingAddress_ ...)
#SNIPPET.RegistrationSet ... Alias of the registration set (BillingAddress, ShippingAddress)
#SNIPPET.ToggleBox ... ID for the Element that should be toggled
#SNIPPET.ShowShippingAddress ... Flag if ShippingAddress should be displayed (1) or not (0)
Example:
#SNIPPET("SNIPPET-EditCustomerAddresses", "AddressPrefix, Head, ToggleBox, ShowShippingAddress", "BillingAddress_", "{BillingAddress}", "ep-customer-shippingaddress", 1)
#ENDREM
#LOCAL("AddressPrefix", #SNIPPET.AddressPrefix)
#LOCAL("IsMandatory", 0)
#IF(#GET("Shop.RegistrationField.Company.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.Company.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Company}
#ENDIF
#IF(#GET("Shop.RegistrationField.FirstName.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.FirstName.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{FirstName}
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.LastName.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.LastName.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{LastName}
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.CountryID.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.CountryID.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Country}
{EmptyEntry}
#LOCAL("SelectedCountry", #GET(#AddressPrefix."CountryID"))
#BLOCK("CachedInclude", #System.Object, "MBO-CustomerGeneral_System-Countries")
#LOOP(#SORT(#System.Countries,"Native"))
#Native[slice:30,html]#IF(#Native NE #English) (#English[slice:30,html])#ENDIF
#ENDLOOP
#ENDBLOCK
#ENDLOCAL
#REM #ENDREM
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.Street.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.Street.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Street}
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.Street2.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.Street2.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Street2}
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.Zipcode.Is".#SNIPPET.RegistrationSet."Visible") OR #GET("Shop.RegistrationField.City.Is".#SNIPPET.RegistrationSet."Visible"))
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.EMail.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.EMail.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{EMail}
#REM #ENDREM
#ENDIF
#IF(#GET("Shop.RegistrationField.Phone.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.Phone.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Phone}
#ENDIF
#IF(#GET("Shop.RegistrationField.PhoneCell.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.PhoneCell.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{PhoneCell}
#ENDIF
#IF(#GET("Shop.RegistrationField.Birthday.Is".#SNIPPET.RegistrationSet."Visible"))
#IF(#GET("Shop.RegistrationField.Birthday.Is".#SNIPPET.RegistrationSet."Mandatory")) #SET("IsMandatory", 1) #ELSE #SET("IsMandatory", 0)#ENDIF
{Birthday}
#ENDIF
#IF(#DEFINED(#SNIPPET.ToggleBox))
{SeparateShippingAddress}
#REM #ENDREM
#ENDIF
#REM #ENDREM
#ENDLOCAL #REM IsMandatory #ENDREM
#ENDLOCAL #REM AddressPrefix #ENDREM