Package DE_EPAGES::Order::API::Object::CustomerOrder
object interface for CustomerOrder.
Base |
DE_EPAGES::Shop::API::Object::ShopObject |
Functions
- addLineItemContainer
- className
- clone
- container
- dbPackage
- exportXMLAttributes
- getExtraExportableAttributes
- getWebUrl
- insertLineItem
- recalculate
- taxAreaDigitalByAddress
- updateTaxArea
- updateTaxAreaDigital
addLineItemContainer
Adds a line item container to a new order that does not have a line item container. Note: Do not usde this method directly! Use DE_EPAGES::Order::API::Order::CreateOrder instead.
Syntax |
$Order->addLineItemContainer( $hValues ); |
Example |
$Order->addLineItemContainer( { 'CurrencyID' => 'USD', 'LocaleID' => 'en_US' } ); |
Input |
|
Return |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $CustomerOrder->className; |
Return |
|
clone
Inserts a new order into the database as copy from old order.
Syntax |
$Clone = $CustomerOrder->clone( $hInfo ); $Clone = $CustomerOrder->clone( $hInfo, $Recursive ); |
Input |
|
Return |
|
container
Returns the line item container of the order.
Syntax |
$LineItemContainer = $CustomerOrder->container; |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $CustomerOrder->dbPackage; |
Return |
|
exportXMLAttributes
Returns plain attributes of object to XML export driver. This function removes bit attributes with value 0.
Syntax |
$hAttributes = $Object->exportXMLAttributes( $Driver, $hAllAttributes ); |
Input |
|
Return |
|
getExtraExportableAttributes
Returns names of attributes of object for XML export of orders.
Syntax |
$aAttributes = $Object->getExtraExportableAttributes(); |
Return |
|
getWebUrl
Construct the web url of a given object dependend of the following parameters:
Syntax |
$WebUrl = $Object->getWebUrl($hParams); |
Input |
|
Return |
|
insertLineItem
Insert a lineItem in to container, see DE_EPAGES::Order::API::Object::LineItemContainer::insertLineItem.
Syntax |
$CustomerOrder->insertLineItem; |
Input |
|
recalculate
Recalculate lineitem container, see DE_EPAGES::Order::API::Object::LineItemContainer::recalculate.
Syntax |
$CustomerOrder->recalculate; |
Input |
|
taxAreaDigitalByAddress
Get the order tax area digital based on the shipping address country Default tax area digital is the tax area based on the shop address Returns the tax area digital for the order, or undef if the address isn't in the EU
Syntax |
$TaxAreaDigital = $Order->taxAreaDigitalByAddress(); |
Return |
|
updateTaxArea
Updates the tax area of the order based on the shipping address. Sets the tax are to the customer tax area if a tax area is explicitely for the customer. Note: After $CustomerOrder->updateTaxArea you must call $CustomerOrder->recalculate to update the price calculation.
Syntax |
$CustomerOrder->updateTaxArea; |
Example |
$CustomerOrder->set({'ShippingAddress' => $NewShippingAddress}); if( $CustomerOrder->updateTaxArea ) { $CustomerOrder->recalculate; } |
Return |
|
updateTaxAreaDigital
Sets the order tax area digital based on the shipping address country Default tax area digital is the tax area based on the shop address Returns true, if calculation of tax has changed, because of changed country in billing or shipping address
Syntax |
$TaxDigitalChanged = $CustomerOrder->updateTaxAreaDigital(); |
Return |
|