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

Package DE_EPAGES::PriceList::API::PriceList

This package provides the main pricelist functions.

@EXPORT_OK
GetCustomerPriceLists
GetProductPriceList
IsTimeFrameDifferent

Functions

GetCustomerPriceLists
GetProductPriceList

GetCustomerPriceLists

Returns the price list that is valid for the customer at the current time. The price list may be assigned to the customer group or directly to the customer. Returns empty list if no price list is valid for this customer.

Syntax
$aPriceLists = GetCustomerPriceLists( $Customer, $CurrencyID, $Shop, $User );
Input
$Customer (object)
Customer object
$CurrencyID (string)
currency id (eg. 'USD')
$Shop (object)
shop object (not used if customer is defined)
$User (object)
user object (not used if customer is defined)
Return
$aPriceLists (ref.array.object)
list of valid PriceList objects

GetProductPriceList

Returns the price list that is valid for the customer and product at the current time. The price list may be assigned to the customer group or directly to the customer. Returns undef if no price list is valid for this customer.

Syntax
$PriceList = GetProductPriceList($Product, $Customer, $CurrencyID, $Shop, $User );
Input
$Product (object)
product object
$Customer (object)
customer object
$CurrencyID (string)
currency id (eg. 'USD')
$Shop (object)
shop object (not used if customer is defined)
$User (object)
user object (not used if customer is defined)
Return
$PriceList (object)
valid PriceList objects