ePages 7.37.0 - DE_EPAGES/PriceList/API/Object/PriceList.pm

Package DE_EPAGES::PriceList::API::Object::PriceList

object interface for PriceList.

Base
DE_EPAGES::Shop::API::Object::ShopObject

Functions

addCustomer
addCustomerGroup
className
dbPackage
existCustomer
existCustomerGroup
getQuantityDiscounts
getQuantityDiscountsByProductID
getScalePrices
getScalePricesByProductID
getValueDiscounts
getValueDiscountsByProductID
hasQuantityDiscounts
hasQuantityDiscountsByProductID
hasScalePrices
hasScalePricesByProductID
hasValueDiscounts
hasValueDiscountsByProductID
quantityDiscounts
removeCustomer
removeCustomerGroup
scalePrices
setQuantityDiscounts
setScalePrices
setValueDiscounts
valueDiscounts

addCustomer

Assigns a customer to the price list.

Syntax
$PriceList->addCustomer( $Customer );
Input
$Customer (object)
customer

addCustomerGroup

Assigns a customer group to the price list.

Syntax
$PriceList->addCustomerGroup( $CustomerGroup );
Input
$CustomerGroup (object)
customer group

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $PriceList->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $PriceList->dbPackage;
Return
$DbPackage (String)
database package name

existCustomer

check if a customer still assigned to the price list.

Syntax
$PriceList->existCustomer( $Customer );
Input
$Customer (object)
customer
Return
$exists (boolean)
1/0 the Customer exists (yes/no)

existCustomerGroup

check if a group still assigned to the price list.

Syntax
$PriceList->existCustomerGroup( $CustomerGroup );
Input
$CustomerGroup (object)
customer group
Return
$exists (boolean)
1/0 the CustomerGroup exists (yes/no)

getQuantityDiscounts

Returns the quantity discounts for the given product.

Syntax
$ahQuantityDiscounts = $Object->getQuantityDiscounts($Product);
Input
$Product (object)
product
Return
$ahQuantityDiscounts (int)
list of hashes, keys:
Discount - discount in percent,
Quantity - product quantity

getQuantityDiscountsByProductID

Returns the quantity discounts for the given product.

Syntax
$ahQuantityDiscounts = $Object->getQuantityDiscountsByProductID($ProductID);
Input
$ProductID (String)
product id
Return
$ahQuantityDiscounts (int)
list of hashes, keys:
Discount - discount in percent,
Quantity - product quantity

getScalePrices

Returns the scale prices for the given product and tax model in the requested precision.

Syntax
$ahScalePrices = $Object->getScalePrices($Product, $TaxModel, );
$ahScalePrices = $Object->getScalePrices($Product, $TaxModel, $ExtraPrecision);
Input
$Product (object)
product
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ExtraPrecision (boolean)
(optional, default=0) extra precision for net prices
in back-office
Return
$ahScalePrices (ref.array.hash)
list of hashes, keys:
Price, Quantity

getScalePricesByProductID

Returns the scale prices for the given product id, tax model and tax class in the requested precision.

Syntax
$ahScalePrices = $Object->getScalePricesByProductID($ProductID, $TaxModel, $TaxCLass);
$ahScalePrices = $Object->getScalePricesByProductID($ProductID, $TaxModel, $TaxCLass, $ExtraPrecision);
Input
$ProductID (String)
product id
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$TaxClass (TaxClass)
tax class
$ExtraPrecision (boolean)
(optional, default=0) extra precision for net prices
in back-office
Return
$ahScalePrices (ref.array.hash)
list of hashes, keys:
Price, Quantity

getValueDiscounts

Returns the value discounts for the given product and tax model in the requested precision.

Syntax
$ahValueDiscounts = $Object->getValueDiscounts($Product, $TaxModel, );
$ahValueDiscounts = $Object->getValueDiscounts($Product, $TaxModel, $ExtraPrecision);
Input
$Product (object)
product
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ExtraPrecision (boolean)
(optional, default=0) extra precision for net prices
in back-office
Return
$ahValueDiscounts (ref.array.hash)
list of hashes, keys:
Discount, Value

getValueDiscountsByProductID

Returns the value discounts for the given product, tax model, tax class in the requested precision.

Syntax
$ahValueDiscounts = $Object->getValueDiscountsByProductID($ProductID, $TaxModel, $TaxClass);
$ahValueDiscounts = $Object->getValueDiscountsByProductID($ProductID, $TaxModel, $TaxClass, $ExtraPrecision);
Input
$ProductID (String)
product id
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$TaxClass (taxClass)
tax class
$ExtraPrecision (boolean)
(optional, default=0) extra precision for net prices
in back-office
Return
$ahValueDiscounts (ref.array.hash)
list of hashes, keys:
Discount, Value

hasQuantityDiscounts

Returns true if the pricelist includes a quantity discount for the given product.

Syntax
$HasDiscounts = $PriceList->hasQuantityDiscounts( $Product );
Input
$Product (object)
product
Return
$HasDiscounts (boolean)
true if a discount exists

hasQuantityDiscountsByProductID

Returns true if the pricelist includes a quantity discount for the given product id.

Syntax
$HasDiscounts = $PriceList->hasQuantityDiscountsByProductID( $ProductID );
Input
$ProductID (string)
id of the product
Return
$HasDiscounts (boolean)
true if a discount exists

hasScalePrices

Returns true if the pricelist includes scale prices for the given product.

Syntax
$HasScalePrices = $PriceList->hasScalePrices( $Product );
Input
$Product (object)
product
Return
$HasScalePrices (boolean)
true if a scale price exists

hasScalePricesByProductID

Returns true if the pricelist includes scale prices for the given product id.

Syntax
$HasScalePrices = $PriceList->hasScalePricesByProductID( $ProductID );
Input
$ProductID (string)
id of the product
Return
$HasScalePrices (boolean)
true if a scale price exists

hasValueDiscounts

Returns true if the pricelist includes a value discount for the given product.

Syntax
$HasDiscounts = $PriceList->hasValueDiscounts( $Product );
Input
$Product (object)
product
Return
$HasDiscounts (boolean)
true if a discount exists

hasValueDiscountsByProductID

Returns true if the pricelist includes a value discount for the given product id.

Syntax
$HasDiscounts = $PriceList->hasValueDiscountsByProductID( $ProductID );
Input
$ProductID (string)
id of the product
Return
$HasDiscounts (boolean)
true if a discount exists

quantityDiscounts

Returns all quantity discounts for the given product in this price list.

Syntax
$aQuantityDiscounts = $PriceList->quantityDiscounts( $Product );
Input
$Product (object)
product
Return
$aQuantityDiscounts (ref.array.object)
list of QuantityDiscount objects

removeCustomer

Removes the assignment of a customer to the price list.

Syntax
$PriceList->removeCustomer( $Customer );
Input
$Customer (object)
customer

removeCustomerGroup

Removes the assignment of a customer group to the price list.

Syntax
$PriceList->removeCustomerGroup( $CustomerGroup );
Input
$CustomerGroup (object)
customer group

scalePrices

Returns all scale prices for the given product in this price list.

Syntax
$aScalePrices = $PriceList->scalePrices( $Product );
Input
$Product (object)
product
Return
$aScalePrices (ref.array.object)
list of ScalePrice objects

setQuantityDiscounts

Sets all quantity discounts for the given product and tax model. Deletes quantity discounts that are not included in the list. Calculates net prices from gross prices if $TaxModel is TAX_MODEL_GROSS.

Syntax
$Object->setQuantityDiscounts($Product, $TaxModel, $ahQuantityDiscounts);
Input
$Product (object)
product
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ahQuantityDiscounts (ref.array.hash)
list of hashes, keys:
Quantity, Discount

setScalePrices

Sets all scale prices for the given product and tax model. Deletes scale prices that are not included in the list. Calculates net prices from gross prices if $TaxModel is TAX_MODEL_GROSS.

Syntax
$Object->setScalePrices($Product, $TaxModel, $ahScalePrices);
Input
$Product (object)
product
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ahScalePrices (ref.array.hash)
list of hashes, keys:
Price, Quantity

setValueDiscounts

Sets all value discounts for the given product and tax model. Deletes value discounts that are not included in the list. Calculates net prices from gross prices if $TaxModel is TAX_MODEL_GROSS.

Syntax
$Object->setValueDiscounts($Product, $TaxModel, $ahValueDiscounts);
Input
$Product (object)
product
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ahScalePrices (ref.array.hash)
list of hashes, keys:
Value, Discount

valueDiscounts

Returns all value discounts for the given product in this price list.

Syntax
$aValueDiscounts = $PriceList->valueDiscounts( $Product );
Input
$Product (object)
product
Return
$aValueDiscounts (ref.array.object)
list of ValueDiscount objects