ePages 6.12.0 - DE_EPAGES/Order/API/Object/Basket.pm

Package DE_EPAGES::Order::API::Object::Basket

object interface for Basket.

Base
DE_EPAGES::Object::API::Object::Object

Functions

className
container
dbPackage
insertLineItem
recalculate
updatePaymentMethod
updateShippingMethod
updateTaxArea

className

Returns the class name, used for DAL access.

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

container

Returns lineitem container of basket.

Syntax
$LineItemContainer = $Basket->container;

dbPackage

Returns the database package, used for DAL access.

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

insertLineItem

Insert a lineItem in to container, see DE_EPAGES::Order::API::Object::LineItemContainer::insertLineItem.

Syntax
$Basket->insertLineItem;

recalculate

Recalculate lineitem container, see DE_EPAGES::Order::API::Object::LineItemContainer::recalculate.

Syntax
$Basket->recalculate;

updatePaymentMethod

Sets the basket payment method based on the shipping/billing address country Returns 1 if payment method has changed, because of changed country in billing or shipping address

Syntax
$PaymentChanged = $Basket->updatePaymentMethod();
Return
$PaymentChanged (integer)
  • 1 : payment method has changed
  • -1 : no payment method exists | integer
  • undef : existing payment method is ok

updateShippingMethod

Sets the basket shipping method based on the shipping/billing address country Returns 1 if shipping method has changed, because of changed country in billing or shipping address

Syntax
$ShippingChanged = $Basket->updateShippingMethod();
Return
$ShippingChanged (integer)
  • 1 : shipping method has changed
  • -1 : no shipping method exists | integer
  • undef : existing shipping method is ok

updateTaxArea

Sets the basket tax area based on the shipping address country Returns true, if calculation of tax has changed, because of changed country in billing or shipping address

Syntax
$TaxChanged = $Basket->updateTaxArea();
Return
$TaxChanged (boolean)
true if tax area or tax calculation has changed,
otherwise undef