ePages 6.11.0 - DE_EPAGES/PriceList/API/TLE/ProductHandler.pm

Package DE_EPAGES::PriceList::API::TLE::ProductHandler

Implements TLE functions for price lists.

Functions

GlobalValueDiscounts
HasQuantityPrices
HasValueDiscounts
LOOPGlobalValueDiscounts
LOOPPriceInfoQuantities
LOOPValueDiscounts
PriceInfoQuantities
ValueDiscounts

GlobalValueDiscounts

Loop variable for LOOPGlobalValueDiscounts #Value contains the minimum price.
#Discount contains the discount in percent.

Syntax
#LOCAL("GlobalValues", #GlobalValueDiscounts(#Object,#Session.User.Object, #INPUT.Currency))
Example
#LOCAL("GlobalValues", #GlobalValueDiscounts(#Object,#Session.User.Object, #INPUT.Currency))
    #SET("COUNTValueDiscount", 1)
    #IF(#COUNT(#DiscountValues))
        ...
        #LOOP(#DiscountValues)
            ...
        #ENDLOOP
        ...
    #ENDIF
#ENDLOCAL
Input
#Shop (object)
shop object
#User (object)
user object
#Currency (string)
currency id (e.g. 'USD')

HasQuantityPrices

Returns true if a product has any quantity discounts in the given price list.

Syntax
#FUNCTION("HasQuantityPrices", #Product, #PriceList)
Example
#IF(#FUNCTION("HasQuantityPrices", #Product.Object, #PriceList.Object))
  {HasQuantityPrices}
#ENDIF
Input
#Product (object)
product object
#PriceList (object)
PriceList object

HasValueDiscounts

Returns true if a product has any value discounts in the given price list.

Syntax
#FUNCTION("HasValueDiscounts", #Product, #PriceList)
Example
#IF(#FUNCTION("HasValueDiscounts", #Product.Object, #PriceList.Object))
  {HasQuantityPrices}
#ENDIF
Input
#Product (object)
product object
#PriceList (object)
PriceList object

LOOPGlobalValueDiscounts

Loops the template code for each value discount in the price list that is applicable fo the given user.
The TLE variables #Value and #Discount can be used within the block.
#Value contains the minimum price.
#Discount contains the discount in percent.

Syntax
#BLOCK("LOOPGlobalValueDiscounts", #Shop, #User, #CurrencyID) template #ENDBLOCK
Example
#BLOCK("LOOPGlobalValueDiscounts", #Shop, #Session.User.Object, #INPUT.Currency)
  #Value[money] : #Discount[float]
#ENDBLOCK
Input
#Shop (object)
shop object
#User (object)
user object
#Currency (string)
currency id (e.g. 'USD')

LOOPPriceInfoQuantities

Loops the template code for each price in the price list that is applicable fo the given user.
The TLE variables #Quantity, #Price and #Discount can be used within the block.
#Quantity contains the minimum quantity.
#Price contains the price per order unit.
#Discount contains the discount in percent.

Syntax
#BLOCK("LOOPPriceInfoQuantities", #Product, #User, #CurrencyID) template #ENDBLOCK
Example
#BLOCK("LOOPPriceInfoQuantities", #Object, #Session.User.Object, #INPUT.Currency)
  #Quantity[integer] #OrderUnit.NameOrAlias :
  #IF(#Price)#Price[money]#ENDIF
  #IF(#Discount)#Discount[float] %#ENDIF
#ENDBLOCK
Input
#Product (object)
product object
#User (object)
user object
#CurrencyID (string)
currency id (e.g. 'USD')

LOOPValueDiscounts

Loops the template code for each value discount in the price list that is applicable fo the given user.
The TLE variables #Value and #Discount can be used within the block.
#Value contains the minimum price.
#Discount contains the discount in percent.

Syntax
#BLOCK("LOOPValueDiscounts", #Product, #User, #CurrencyID) template #ENDBLOCK
Example
#BLOCK("LOOPValueDiscounts", #Object, #Session.User.Object, #INPUT.Currency)
  #Value[money] : #Discount[float]
#ENDBLOCK
Input
#Product (object)
product object
#User (object)
user object
#Currency (string)
currency id (e.g. 'USD')

PriceInfoQuantities

Loop variable for PriceInfoQuantities #Quantity contains the minimum quantity.
#Price contains the price per order unit.
#Discount contains the discount in percent.

Syntax
#LOCAL("LocalVariableXY", #PriceInfoQuantities(#Object,#Session.User.Object, #INPUT.Currency))
Example
#LOCAL("InfoPriceQuantities", #PriceInfoQuantities(#Object,#Session.User.Object, #INPUT.Currency))
    #LOOP(#InfoPriceQuantities)
        ...
    #ENDLOOP
#ENDLOCAL
Input
#Product (object)
product object
#User (object)
user object
#CurrencyID (string)
currency id (e.g. 'USD')

ValueDiscounts

Loop variable for LOOPValueDiscounts #Quantity contains the minimum quantity.
#Price contains the price per order unit.
#Discount contains the discount in percent.

Syntax
#LOCAL("DiscountValues", #ValueDiscounts(#Object,#Session.User.Object, #INPUT.Currency))
Example
#LOCAL("DiscountValues", #ValueDiscounts(#Object,#Session.User.Object, #INPUT.Currency))
    #SET("COUNTValueDiscount", 1)
    #IF(#COUNT(#DiscountValues))
        ...
        #LOOP(#DiscountValues)
            ...
        #ENDLOOP
        ...
    #ENDIF
#ENDLOCAL
Input
#Product (object)
product object
#User (object)
user object
#CurrencyID (string)
currency id (e.g. 'USD')