#IF(#DELETE)
{AcceptAction}
#ELSIF(#FormError AND NOT #FormErrors.Form.Login.ErrorCount)
#JOIN(" ",#FormErrors.Errors)#IF(#Reason EQ "ProductCanNotAddToBasket")
{ProductCanNotAddToBasket} #Product.NameOrAlias #ELSIF(#Name EQ "Quantity")
{InputError}
#ELSIF(#Reason EQ "NoShipping") {ProductCanNotAddToBasket} ({WrongShippingSettings})
#ELSIF(#Reason EQ "ExclusiveShippingMethod") {ExclusiveShippingMethod}
#ELSIF(#Reason EQ "NoPayment") {ProductCanNotAddToBasket} ({WrongPaymentSettings})
#ELSE {UnknownError} #Reason #Name
#ENDIF
#ENDJOIN
#ENDIF
#IF(#DELETE)
{Delete}
{Cancel}
#ELSE
#IF(#DEFINED(#INPUT.ChangeAction) AND #INPUT.ChangeAction EQ "AddContainerItemsToShoppingList")
#IF (#DEFINED(#INPUT.Source) AND #INPUT.Source EQ "Order")
{OrderToShoppingListInfo}
{OrderToShoppingListInfoText}
#ELSE
{BasketToShoppingListInfo}
{BasketToShoppingListInfoText}
#ENDIF
#ENDIF
#LOCAL("PriceTagInfo", 0)
#LOOP(#Session.User.Customers)#IF(#TaxModel AND #Shop.PriceTagInfoMultiProductGross)#SET("PriceTagInfo", 1)#ELSIF(NOT #TaxModel AND #Shop.PriceTagInfoMultiProductNet)#SET("PriceTagInfo", 2)#ENDIF#ENDLOOP
{Quantity}
{Product}
{Price}
{Actions}
#LOCAL("ListItems", #Items)
#LOCAL("Alternate", 0)
#IF(#COUNT(#ListItems))
#SET("ShoppingListID",#ObjectID)
#LOOP(#ListItems)
#SET("Alternate", 1 - #Alternate)#WITH_ERROR(#FormError)
#Product.OrderUnit.NameOrAlias
#ENDWITH_ERROR
#IF(#Shop.ShowThumbnailsInBasket AND (#Product.ImageThumbnail OR #Product.ImageSmall))
#ENDIF
#IF(#Product AND #Product.IsVisible)
#WITH(#Product)
#NameOrAlias
#IF(#Shop.IsProductNoVisible)
{ItemNoShort}: #Alias
#ENDIF
#IF(#SuperProduct)
(#JOIN(", ",#Product.VariationTypeValues)#Attribute.NameOrAlias#SPACE[0]: #FORMAT(#GET("Product.".#Attribute.Alias.".ValueOrAlias"),"html")#ENDJOIN)
#ENDIF
#IF(NOT #IsVisible)
({ProductNotVisible})
#ELSIF(NOT #CanAddToBasket)
#IF(NOT #IsAvailable AND #AvailabilityComment)
#AvailabilityComment[0]
#ENDIF
#ENDIF
#ENDWITH
#ELSE
#IF(#Product)
#Product.NameOrAlias
#ELSE
#NameOrAlias
#ENDIF
#ENDIF
#WITH(#Product)
#INCLUDE("INC-ProductStockLevelNoIcon")
#ENDWITH
#WITH(#Product)
#IF(#DisplayDeliveryWeight AND #Weight)
{Weight}: #Weight[float] #WeightUnit.Abbreviation
#ENDIF
#ENDWITH
#IF(#Product AND #Product.IsVisible)
#WITH(#Product)
#LOCAL("DisplayPrice", #FUNCTION("DISPLAYPRICE", #Object, #INPUT.Currency, #Shop.TaxModel, #Session.User.Object))
#DisplayPrice[money]
#ENDLOCAL
#IF(#PriceTagInfo){MandatoryStar}#ENDIF
#ENDWITH
#ENDIF
#IF(#DEFINED(#Product) AND #DEFINED(#LISTPRICE(#Product.Object, #INPUT.Currency)) AND #Shop.FeatureMaxValue.Basket AND #Product.CanAddToBasket)
#IF(#Product.IsAppointment)
#ELSE
#IF(NOT (#Product.SuperProduct.IsCustomizable OR (NOT #Product.SuperProduct AND #Product.IsCustomizable)))
#SET("Text", #FORMAT(#ATTRIBUTEVALUE(#Shop.Object, "AddToBasketText", "AddToBasket", #LanguageID, "DE_EPAGES::Dictionary"),"html"))
#ENDIF
#ENDIF
#ENDIF
#ENDLOOP
#ELSE
{ShoppingListEmpty}
#ENDIF
#ENDLOCAL
#IF(#COUNT(#ListItems) > 0)
#IF(#PriceTagInfo)
#IF(#PriceTagInfo == 1){MandatoryStar} #Shop.PriceTagInfoMultiProductGross[0]
#ELSIF(#PriceTagInfo == 2){MandatoryStar} #Shop.PriceTagInfoMultiProductNet[0]
#ENDIF
#ENDIF
#ENDIF
#IF(#Shop.FeatureMaxValue.Basket)
#LOCAL("Customer", #FUNCTION("GetCustomerForUserID", #Session.User.ID, #Shop.ID))
#LOCAL("ProductCount", #COUNT(#GREP(#ListItems, "Product.IsAppointment", 0)))
#IF(#Customer.IsDoOrderAllowed)
#IF(#ProductCount)
{Save}
{AddToBasket}
#ENDIF
#IF(#COUNT(#Session.User.Baskets))
#LOCAL("CountLineItems", 0)
#LOOP(#Session.User.Baskets)
#SET("CountLineItems", #COUNT( #LineItemContainer.LineItems ))
#ENDLOOP
#IF (#CountLineItems)
{CopyBasketToShoppingList}
#ENDIF
#ENDLOCAL
#ENDIF
#ENDIF
#ENDLOCAL#ENDLOCAL
#ENDIF