ePages 7.38.0 - DE_EPAGES/Product/API/Table/ProductPrice.pm

Package DE_EPAGES::Product::API::Table::ProductPrice

interface for table ProductPrice

@EXPORT_OK
InsertProductPrice
UpdateProductPrice
DeleteProductPrice
GetAllPKeyProductPrices
GetAllInfoProductPrices
GetInfoProductPrice
ExistsProductPrice
GetPKeyProductPricesByProductID
GetInfoProductPricesByProductID
GetPKeyProductPricesByCurrencyID
GetInfoProductPricesByCurrencyID

Functions

DeleteProductPrice
ExistsProductPrice
GetAllInfoProductPrices
GetAllPKeyProductPrices
GetInfoProductPrice
GetInfoProductPricesByCurrencyID
GetInfoProductPricesByProductID
GetPKeyProductPricesByCurrencyID
GetPKeyProductPricesByProductID
InsertProductPrice
OnDeleteCurrency
UpdateProductPrice

DeleteProductPrice

Deletes a(n) ProductPrice.

Syntax
DeleteProductPrice($ProductID, $CurrencyID);
DeleteProductPrice($hProductPrice); # if $hProductPrice includes ProductID, CurrencyID
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)

ExistsProductPrice

Returns true if the ProductPrice exists.

Syntax
$exists = ExistsProductPrice($ProductID, $CurrencyID);
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)
Return
$exists (boolean)
1/0 the ProductPrice exists (yes/no)

GetAllInfoProductPrices

Returns all objects of ProductPrice.

Syntax
$ahProductPrices = GetAllInfoProductPrices();
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money

GetAllPKeyProductPrices

Returns all ProductPrice identifiers.

Syntax
$ahProductPriceIDs = GetAllPKeyProductPrices();
Return
$ahProductPriceIDs (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)

GetInfoProductPrice

Returns the ProductPrice by identifier.

Syntax
$hProductPrice = GetInfoProductPrice($ProductID, $CurrencyID);
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)
Return
$hProductPrice (reference to hash)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money

GetInfoProductPricesByCurrencyID

Returns objects of ProductPrice by alternate key CurrencyID.

Syntax
$ahProductPrices = GetInfoProductPricesByCurrencyID($CurrencyID);
Input
$CurrencyID (char(3))
alpha currency code (ISO 4217)
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money

GetInfoProductPricesByProductID

Returns objects of ProductPrice by primary key element ProductID.

Syntax
$ahProductPrices = GetInfoProductPricesByProductID($ProductID);
Input
$ProductID (int)
product identifier
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money

GetPKeyProductPricesByCurrencyID

Returns primary keys of ProductPrice by alternate key CurrencyID.

Syntax
$ahKeys = GetPKeyProductPricesByCurrencyID($CurrencyID);
Input
$CurrencyID (char(3))
alpha currency code (ISO 4217)
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)

GetPKeyProductPricesByProductID

Returns primary keys of ProductPrice by primary key element ProductID.

Syntax
$ahKeys = GetPKeyProductPricesByProductID($ProductID);
Input
$ProductID (int)
product identifier
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)

InsertProductPrice

Creates an entry of ProductPrice.

Syntax
InsertProductPrice($hProductPrice);
Input
$hProductPrice (reference to hash)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money

OnDeleteCurrency

Deletes ProductPrice of this model when a(n) Currency is deleted.

Syntax
OnDeleteCurrency($hParams);
Input
$hParams (ref.hash.*)
primary key of object Currency, key is
  • CurrencyID

UpdateProductPrice

Updates a(n) ProductPrice if any element was changed.

Syntax
UpdateProductPrice($ProductID, $CurrencyID, $hProductPrice);
UpdateProductPrice($hProductPrice); # if $hProductPrice includes ProductID, CurrencyID
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)
$hProductPrice (reference to hash)
with following keys:
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money
  • Deposit - Deposit (e.g. for bottles) (optional)- money
Return
1 (int)
1