#REM#ENDREM #LOCAL("CombinationNotAvailable", 0) #IF(#FormError AND NOT #FormErrors.Form.Login.ErrorCount) #LOOP(#FormErrors.Reasons) #IF(#Reason EQ "SUBPRODUCT_NOT_EXISTS")#SET("CombinationNotAvailable", 1)#ENDIF #ENDLOOP #ENDIF #IF(#INPUT.ViewAction NE "ViewProductPrint" AND #INPUT.ViewAction NE "ViewPrint") #IF(#IsAppointment) #IF(#IsVisible AND #IsAvailable) #IF(#Shop.LoginRequired2Order)
{AddToBasketNotAllowedForUnregistered}
{RegisterNow} #ELSE #IF(#DEFINED(#Shop.MakeAppointmentLinkText))#Shop.MakeAppointmentLinkText#ELSE {MakeAppointmentLink}#ENDIF #ENDIF #ENDIF #ELSIF(#HASPRICE(#Object, #INPUT.Currency, #Session.User.Object)) #IF(#Shop.FeatureMaxValue.Basket AND #CombinationNotAvailable NEQ 0 AND #CanAddToBasket AND NOT #TemplateNoAddToBasket) #LOCAL("PagerSetting",#PagerSettings)#IF(NOT #DEFINED(#PagerSettings))#SET("PagerSettings","")#ENDIF #LOCAL("LinkOption",#LinkOption)#IF(NOT #DEFINED(#LinkOption))#SET("LinkOption","Text")#ENDIF #LOCAL("Add2BasketLinkVersion", "AddToBasket") #IF(NOT #Session.User OR #Session.User.IsAnonymous) #IF(#Shop.LoginRequired2Order) #SET("Add2BasketLinkVersion", "RegistrationLink") #ENDIF #ELSE #LOCAL("Customer", #FUNCTION("GetCustomerForUserID", #Session.User.ID, #Shop.ID)) #IF(NOT #Customer) #IF(#Shop.LoginRequired2Order) #SET("Add2BasketLinkVersion", "RegistrationLink") #ENDIF #ELSIF(NOT #Customer.IsDoOrderAllowed) #SET("Add2BasketLinkVersion", "NotAllowForCustomer") #ENDIF #ENDLOCAL #ENDIF #IF(#Add2BasketLinkVersion EQ "RegistrationLink") #REM #ENDREM
{AddToBasketNotAllowedForUnregistered}
{RegisterNow} #ELSIF(#Add2BasketLinkVersion EQ "NotAllowForCustomer") #REM #ENDREM
{AddToBasketNotAllowedForAccount}
#ELSE #REM #ENDREM
#IF(#Shop.AddToBasketView==0)#MENU("BasketLinkParameters") #INCLUDE(#Template) #ENDMENU#ENDIF #IF(#LinkOption EQ "NoOption") #REM #ENDREM #ELSE #REM #ENDREM #LOCAL("TempOrderUnit",#OrderUnit.NameOrAlias) #IF(#OrderUnit.Abbreviation)#SET("TempOrderUnit",#OrderUnit.Abbreviation)#ENDIF #IF(#Shop.AddToBasketOption == 1) #REM #ENDREM #IF(#OrderUnit.Alias NE "piece")#TempOrderUnit#ENDIF #ELSIF(#Shop.AddToBasketOption == 2) #REM #ENDREM #IF(#OrderUnit.Alias NE "piece")#TempOrderUnit#ENDIF #ELSIF(#Shop.AddToBasketOption == 3) #REM #ENDREM #IF(#OrderUnit.Alias NE "piece")#TempOrderUnit#ENDIF #ELSE #ENDIF #REM #ENDREM #ENDLOCAL #ENDIF
#ENDIF #ENDLOCAL#ENDLOCAL#ENDLOCAL #ENDIF #ENDIF#ENDIF #ENDLOCAL #REM#ENDREM