Package DE_EPAGES::Product::API::TLE::ProductHandler
Implements TLE functions for products.
Functions
- APPOINTMENTMENT_PREPAYMENT
- APPOINTMENTMENT_PRICE
- AppointmentDayList
- BUNDLEDLISTPRICESUM
- CANDISPLAYFROMPRICE
- DEPOSIT
- DISPLAYFREETAXINFO
- DISPLAYPRICE
- DISPLAYPRICETAGINFOGROSS
- ECOPARTICIPATION
- ExistingCombinationAttributes
- GetUserDefinedAttributes
- HASPRICE
- InvisibleVariations
- IsVariationAttribute
- LISTPRICE
- LOOPPosVariationTypeValues
- MANUFACTURERPRICE
- PREPAYMENT
- PRICESAVINGS
- ProductURL
- REFERENCEPRICE
- UnAvailableCombinationAttributes
- UnavailableVariations
APPOINTMENTMENT_PREPAYMENT
Returns the value for prepayment.
Syntax |
#APPOINTMENTMENT_PREPAYMENT(#Product, #CurrencyID, #TaxModel, #User, #Quantity) |
Input |
|
APPOINTMENTMENT_PRICE
Returns true if price tag into needs to be displayed.
Syntax |
#APPOINTMENTMENT_PRICE(#Product, #CurrencyID, #TaxModel, #User, #Quantity) |
Input |
|
AppointmentDayList
Returns the DE_EPAGES::Calendar::API::Object::Calendar::dayList for the given product DE_EPAGES::Product::API::Object::Product::businessHours.
Syntax |
#AppointmentDayList(#Product, #Date) |
Example |
#LOOP(#AppointmentDayList(#Object, #NOW)) #ENDLOOP |
Input |
|
BUNDLEDLISTPRICESUM
Returns the sum of the list prices of all items of a bundle product. See also: LISTPRICE
Syntax |
#BUNDLEDLISTPRICESUM(#Product, #Currency, #TaxModel) |
Example |
#LOCAL("SumPrice", #BUNDLEDLISTPRICESUM(#Object, #INPUT.Currency, #Shop.TaxModel)) #SumPrice[money] #ENDLOCAL |
Input |
|
CANDISPLAYFROMPRICE
Returns true if "from prices" can be displayed. - VariationPriceFromText must be set - product must be the default sub product or product must be the master product and a available, cheaper sub product with an own price must exists
Syntax |
#CANDISPLAYFROMPRICE(#Product) |
Input |
|
DEPOSIT
Returns the deposit price of a product for a given currency and tax model. If user is defined the tax model of the user take effect.
Syntax |
#DEPOSIT(#Product, #CurrencyID, #TaxModel, #User, #ExtraPrecision) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("Deposit", #DEPOSIT(#Product, #CurrencyID, #Shop.TaxModel, #User, 1)) #IF(#DEFINED(#Deposit)) #Deposit[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
DISPLAYFREETAXINFO
Returns true if the 'free tax' text should be displayed.
Syntax |
#DISPLAYFREETAXINFO($Product, $User) #LOCAL("DisplayFreeTaxInfo", #DISPLAYFREETAXINFO($Product, $User)) #IF(#DisplayFreeTaxInfo) #Shop.PriceTagInfoSingleProductFreeTax #ENDIF #ENDLOCAL |
Input |
|
DISPLAYPRICE
Returns the display price of a product for a given currency, tax model and customer. If user is defined the tax model of the user take effect.
Syntax |
#DISPLAYPRICE(#Product, #CurrencyID, #TaxModel, #User, #NoFromPrice) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("ListPrice", #DISPLAYPRICE(#Product, #CurrencyID, #Shop.TaxModel, #User, #NoFromPrice)) #IF(#DEFINED(#ListPrice)) #ListPrice[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
DISPLAYPRICETAGINFOGROSS
Returns true if gross price tag into needs to be displayed. If user is defined the tax model of the user take effect.
Syntax |
#DISPLAYPRICETAGINFOGROSS(#Product, #TaxModel, #User) #LOCAL("DisplayPriceTagInfoGross", #DISPLAYPRICETAGINFOGROSS(#Product, #Shop.TaxModel, #User)) #IF(#DisplayPriceTagInfoGross) #Shop.PriceTagInfoMultiProductGross #ENDIF #ENDLOCAL |
Input |
|
ECOPARTICIPATION
Returns the list price of a product for a given currency and tax model. If user is defined the tax model of the user take effect.
Syntax |
#ECOPARTICIPATION(#Product, #CurrencyID, #TaxModel, #User, #ExtraPrecision) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("EcoParticipation", #ECOPARTICIPATION(#Product, #CurrencyID, #Shop.TaxModel, #User, 1)) #IF(#DEFINED(#EcoParticipation)) #EcoParticipation[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
ExistingCombinationAttributes
Finds all AttributeValueIDs which are available in context to already selected attribute values and possible unselected ones.
Syntax |
#ExistingCombinationAttributes(#Product, #SelectParams) |
Example |
#LOCAL("ExistingCombinationAttributes", #ExistingCombinationAttributes(#Object, #SelectParams)) #IF(#KEY(#ExistingCombinationAttributes, #ID)) ... #ENDIF #ENDLOCAL |
Input |
|
Return |
|
GetUserDefinedAttributes
Returns the user defined attributes that are displayed on the "Description" tab on the product page.
Syntax |
#LOCAL("UserDefinedAttributes", #FUNCTION("GetUserDefinedAttributes", #Product, #SkipOwnTab) ) |
Example |
#LOCAL("UserDefinedAttributes", #FUNCTION("GetUserDefinedAttributes", #Product, #SkipOwnTab) ) #LOOP(#UserDefinedAttributes) #ENDLOOP #ENDLOCAL |
Input |
|
Return |
|
HASPRICE
Returns true if a price exists for the given product, currency and user, i.e. either a customer specific price for 1 item or the list price.
Syntax |
#HASPRICE(#Product, #CurrencyID, #User) |
Example |
#IF(#HASPRICE(#Product, #INPUT.Currency, #Session.User.Object)) <a href="...">add to basket</a> #ENDIF #IF(#HASPRICE(#Product, "EUR", #Session.User.Object)) <a href="...">add to basket</a> #ENDIF |
Input |
|
InvisibleVariations
Finds all AttributeValueIDs which are invisible in context to already selected attribute values and possible unselected ones.
Syntax |
#InvisibleVariations(#Product, #SelectParams) |
Example |
#LOCAL("InvisibleVariationIDs", #InvisibleVariations(#Object, #SelectParams)) #IF(#KEY(#InvisibleVariationIDs, #ID)) ... #ENDIF #ENDLOCAL |
Input |
|
Return |
|
IsVariationAttribute
Tests if the attribute is a variation attribute of product.
Syntax |
#IsVariationAttribute(#Product, #Attribute) #LOOP(#UserDefinedAttributeValues) #IF(#IsVariationAttribute(#Object, #Attribute)) #Attribute.NameOrAlias = #Value #ENDIF #ENDIF |
Input |
|
LISTPRICE
Returns the list price of a product for a given currency and tax model.
Syntax |
#LISTPRICE(#Product, #Currency, #TaxModel, #ExraPrecision) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("ListPrice", #LISTPRICE(#Object, #INPUT.Currency, #Shop.TaxModel, 1)) #IF(#DEFINED(#ListPrice)) #ListPrice[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
LOOPPosVariationTypeValues
Loops the template code for each variation type. The TLE variables #Attribute and #PreDefAttributes can be used within the block. #Attibute contains the attribute object. #PreDefAttributes contains a list of all available values of the variation type. #IsUsed indicates if the value is used by the product.
Syntax |
#BLOCK("LOOPPosVariationTypeValues", #Product) template #ENDBLOCK |
Example |
#BLOCK("LOOPPosVariationTypeValues", #Object) #Attribute.NameOrAlias #LOOP(#PreDefAttributes) #ValueOrAlias #IF(NOT #IsUsed)(not used)#ENDIF #ENDLOOP #ENDBLOCK |
Input |
|
MANUFACTURERPRICE
Returns the manufacturer's suggested retail price of a product for a given currency and tax model. If user is defined the tax model of the user take effect.
Syntax |
#MANUFACTURERPRICE(#Product, #CurrencyID, #TaxModel, #User, #ExtraPrecision) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("ListPrice", #MANUFACTURERPRICE(#Product, #CurrencyID, #Shop.TaxModel, #User, 1)) #IF(#DEFINED(#ListPrice)) #Price[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
PREPAYMENT
Returns the prepayment of an appointment for a given currency and tax model.
Syntax |
#PREPAYMENT(#Product, #Currency, #TaxModel, #ExraPrecision) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("Prepayment", #PREPAYMENT(#Object, #INPUT.Currency, #Shop.TaxModel, 1)) #IF(#DEFINED(#Prepayment)) #Prepayment[money] #ENDIF #ENDLOCAL #ENDLOCAL |
Input |
|
PRICESAVINGS
Returns the percentage or absolute value of the pricesavings.
Syntax |
#PRICESAVINGS(#Product, #Price1, #Price2) |
Example |
#LOCAL("PriceSavings", #PRICESAVINGS(#Object, #DisplayPrice, #ManufacturerPrice)) #IF(#DEFINED(#PriceSavings))<div>#PriceSavings</div>#ENDIF #ENDLOCAL |
Input |
|
ProductURL
Returns the URL to the product detail page. If this function is called from a search results, additional paramters are passed to the detail page in order to select the appropriate image and variation values in case of a variation product.
Syntax |
#ProductURL(#Product) |
Input |
|
REFERENCEPRICE
Calculates the price of a product relative to the reference amout.
The following formula is used:
#Price * (#Product.RefAmount / #Product.RefContentAmount)
Syntax |
#REFERENCEPRICE(#Product, #Price, #CurrencyID) |
Example |
#LOCAL("CurrencyID", #INPUT.Currency) #LOCAL("ListPrice", #LISTPRICE(#Object, #INPUT.Currency, #Shop.TaxModel)) #LOCAL("ReferencePrice",#REFERENCEPRICE(#Object, #ListPrice, #CurrencyID)) #IF(#ReferencePrice != #ListPrice) #RefAmount#RefUnit.Abbreviation = #ReferencePrice[money] #ENDIF #LOCAL #ENDLOCAL #ENDLOCAL |
Input |
|
UnAvailableCombinationAttributes
Finds all AttributeValueIDs which are not available in context to already selected attribute values and possible unselected ones. If selected params is empty, the function will return AttributeValueIDs where no object exists.
Syntax |
#UnAvailableCombinationAttributes(#Product, #SelectParams) |
Example |
#LOCAL("UnAvailableCombinationAttributes", #UnAvailableCombinationAttributes(#Object, #SelectParams)) #IF(#KEY(#UnAvailableCombinationAttributes, #ID)) ... #ENDIF #ENDLOCAL |
Input |
|
Return |
|
UnavailableVariations
Finds all AttributeValueIDs which are unavailable in context to already selected attribute values and possible unselected ones.
Syntax |
#UnavailableVariations(#Product, #SelectParams) |
Example |
#LOCAL("UnavailableVariationIDs", #UnavailableVariations(#Object, #SelectParams)) #IF(#KEY(#UnavailableVariationIDs, #ID)) ... #ENDIF #ENDLOCAL |
Input |
|
Return |
|