ePages 7.27.0 - DE_EPAGES/PriceList/Hooks/Product.pm

Package DE_EPAGES::PriceList::Hooks::Product

set prices and discounts

Functions

OnAfterProductClone
ProductDiscount
ProductPrice

OnAfterProductClone

Duplicate pricelist after duplication of product. Triggered Hook AfterProductClone.

Syntax
OnAfterProductClone( $hParams );
Input
$hParams (ref.hash.*)

  • Object - product object - object
  • Clone - clone product object - object

ProductDiscount

Hook function for the ProductDiscount hook. Sets the Discount parameter if a quantity discount and/or value discount is applicable for the given quantity of the given product. If no line item container is specified, the absolute discount value is set according to the price quantity of the product.

Syntax
ProductDiscount( $hParams );
Input
$hParams (ref.hash)
  • Object - product - object
  • Quantity - (optional, default=1) quantity - float
  • CurrencyID - currency id - string
  • Customer - (optional) customer - object
  • Container - (optional) lineitem container - object
  • LineItem - (optional) lineitem - object
Output
$hParams (ref.hash)
  • Discount - discount value (money) - float

ProductPrice

Hook function for the ProductPrice hook. Sets the Price parameter if a scale price is applicable for the given quantity of the given product.

Syntax
ProductPrice( $hParams );
Input
$hParams (ref.hash)
  • Object - product - object
  • Quantity - (optional, default=1) quantity - float
  • CurrencyID - currency id - string
  • Customer - (optional) customer - object
  • Container - (optional) lineitem container - object
  • LineItem - (optional) lineitem - object
Output
$hParams (ref.hash)
  • Price - new price - float