Package DE_EPAGES::Order::API::Object::LineItem
object interface for LineItem.
Base |
DE_EPAGES::Object::API::Object::Object |
Functions
- addMailParams
- className
- clearMail
- container
- dbPackage
- formatter
- globalKeys
- grepAvailableShippingMethods
- recalculate
- template
addMailParams
allow to change email params for CustomerOrderConfirmation mail
Syntax |
$LineItem->addMailParams($hParams,$hRegionalParams); |
Example |
my $LineItems = $Order->get('LineItemContainer')->get('Positions'); $_->addMailParams(\%MailParams, \%RegionalParams) foreach @$LineItems; |
Input |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $LineItem->className; |
Return |
|
clearMail
cleanup data from addMailParams
Syntax |
$LineItem->clearMail($hParams,$hRegionalParams); |
Example |
my $LineItems = $Order->get('LineItemContainer')->get('Positions'); $_->clearMail(\%MailParams, \%RegionalParams) foreach @$LineItems; |
Input |
|
container
Returns the container of this item (most parent).
Syntax |
$Container = $LineItem->container; |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $LineItem->dbPackage; |
Return |
|
formatter
Returns the formatter (and rounder) of this line item.
Syntax |
$Formatter = $LineItem->formatter; |
Example |
$self->formatter->round($BasePrice * $Discount / -100), |
Return |
|
globalKeys
Returns list of keys. The lineitemprice depends on this, only keys are returned which are saved at lineitemcontainer and basket or order. If your line item has more external dependencies, overwrite this function.
Syntax |
@Keys = __PACKAGE__->globalKeys; @Keys = $LineItem->globalKeys; |
Return |
|
grepAvailableShippingMethods
Empty methode to allow products to reduce available shipping methods.
Syntax |
$aShippingMethods = $LineItem->grepAvailableShippingMethods($aShippingMethods); |
Input |
|
Return |
|
recalculate
This standard recalculate function save the given values in database. This method should be used for other more specific line items to recalculate their prices and taxes.
Syntax |
$LineItem->recalculate($Container, $hValues); |
Input |
|
template
This function is used to overwrite the given template for the purpose that each lineitem can defined there own template (visualisation).
Syntax |
$Name = $Object->template($Name, $ObjectPageType); |
Input |
|
Return |
|