#IF((#Shop.Categories.Child.SpecialOffers AND #Shop.Categories.Child.SpecialOffers.IsVisible) OR #INPUT.IsEditorModeEnabled)
#IF(NOT(#Shop.LoginRequired AND (NOT #Session.User OR #Session.User.IsAnonymous OR #Shop.ID != #Session.User.Parent.Parent.ID)))
#BLOCK("CachedInclude", #Shop.Object, "SF.SpecialOfferBox" . #CacheIncludesPrices, NOT #Shop.ShowCustomerSpecificPrices)
#LOCAL("SpecialOffersCategory",#Shop.Categories.Child.SpecialOffers)
#IF(#DEFINED(#SpecialOffersCategory.NavigationCaption) OR #DEFINED(#SpecialOffersCategory.Name))#SpecialOffersCategory.NavigationString#ELSE#SPACE[0]{SpecialOffers}#ENDIF
#LOCAL("HasPrice", 0)
#JOIN("", #SpecialOffersCategory.VisibleProducts)
#NameOrAlias
#LOCAL("CurrencyID","")
#IF(#DEFINED(#Session.User.CurrencyID))
#SET("CurrencyID", #Session.User.CurrencyID)
#ELSE
#SET("CurrencyID", #INPUT.Currency)
#ENDIF
#LOCAL("DisplayPrice", #UNDEF)
#LOCAL("ManufacturerPrice", #MANUFACTURERPRICE(#Object, #CurrencyID, #Shop.TaxModel, #Session.User.Object))
#LOCAL("LowestManufacturerPrice", #LOWESTMANUFACTURERPRICEFORVARIATION(#Object, #INPUT.Currency, #Shop.TaxModel, #Session.User.Object))
#IF(#DEFINED(#LowestManufacturerPrice))
#SET("ManufacturerPrice", #LowestManufacturerPrice)
#ENDIF
#IF(#IsMaster)
#SET("DisplayPrice", #DISPLAYPRICE(#Object, #CurrencyID, #Shop.TaxModel, #Session.User.Object, 0))
#ELSE
#SET("DisplayPrice", #DISPLAYPRICE(#Object, #CurrencyID, #Shop.TaxModel, #Session.User.Object, 1))
#ENDIF
#IF(#DEFINED(#ManufacturerPrice))
#IF(#Shop.ReferencePriceText)#Shop.ReferencePriceText[0]#ENDIF
#IF(#Shop.CancelReferencePrice)#ManufacturerPrice[money]#ELSE #ManufacturerPrice[money]#ENDIF
#ENDIF
#SNIPPET("INC-DisplayPrice", "OrderUnitDisplayOption,EnableAsterisk", "Short", "1")
#IF(NOT #IsAppointment AND #DisplayPrice)#SET("HasPrice", 1)#ENDIF
#LOCAL("ReferencePrice",#REFERENCEPRICE(#Object, #DisplayPrice, #CurrencyID))
#LOCAL("LowestReferencePrice",#LOWESTREFERENCEPRICEFORMASTER(#Object, #INPUT.Currency, #Shop.TaxModel))
#IF(#IsMaster AND #DEFINED(#LowestReferencePrice))
#SET("ReferencePrice", #LowestReferencePrice)
#ENDIF
#IF(#DEFINED(#ReferencePrice) AND #ReferencePrice != #DisplayPrice)
(#RefAmount #IF(#DEFINED(#RefUnit.Abbreviation))#RefUnit.Abbreviation#ELSE#RefUnit.NameOrAlias#ENDIF = #ReferencePrice[money])#ENDIF
#ENDLOCAL
#ENDLOCAL
#IF(#DEFINED(#ManufacturerPrice) AND #DEFINED(#DisplayPrice) AND #DisplayPrice < #ManufacturerPrice AND #DisplayPrice > 0)
#LOCAL("PriceSavings", #PRICESAVINGS(#Object, #DisplayPrice, #ManufacturerPrice))
#IF(#DEFINED(#PriceSavings))
{YouSaving} #PriceSavings#ENDIF
#ENDLOCAL
#ENDIF
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#ENDLOCAL
#IF(#ImageHotDeal)
#ENDIF
#ENDJOIN
#IF(#HasPrice AND (#Shop.PriceTagInfoSingleProductGross OR #Shop.PriceTagInfoSingleProductNet OR #Shop.PriceTagInfoSingleProductTaxFree))
#INCLUDE("Explanation-INC-Product-Price")
#ENDIF
#ENDLOCAL
#IF(#INPUT.IsEditorModeEnabled AND NOT #Shop.Categories.Child.SpecialOffers)
{SpecialOffers}
{NoSpecialOffers}
#BLOCK("NewLineReplace", " ")
{InsertPage}
#ENDBLOCK
#ELSIF(#INPUT.IsEditorModeEnabled AND NOT #Shop.Categories.Child.SpecialOffers.IsVisible)
#ENDIF
#ENDLOCAL
#ENDBLOCK
#ENDIF
#ENDIF