Package DE_EPAGES::Order::API::Object::ContainerShippingMethod
Object interface for ContainerShippingMethod extends the shipping method with line item functionalities.
Base |
DE_EPAGES::Shipping::API::Object::ShippingMethod |
Functions
- addToContainer
- calculateShippingPrice
- canAddToBasket
- lineItem
- recalculateLineItem
- valueToFreeDelivery
addToContainer
Adds shipping and tax line item to container.
Syntax |
$LineItem = $ShippingMethod->addToContainer($Container); |
Input |
|
Return |
|
calculateShippingPrice
Returns the shipping price for the given line item container. This method is used by lineItem and recalculateLineItem unless they are overloaded. The default implementation returns 0. Override this method to change the shipping price calculation of a basket or order. To calculate the shipping costs without a lineitem container, e.g. for export to product portals, also overload the method DE_EPAGES::Shipping::API::Object::ShippingMethod::price.
Syntax |
my $ShippingPrice = $ShippingMethod->calculateShippingPrice($Container); |
Input |
|
Return |
|
canAddToBasket
Tests if a shipping method can be added to the basket with the given currency. Uses function DE_EPAGES::Shipping::API::Object::ShippingMethod::price to evaluate if shipping methode has a price (price can be 0). Possible for methods, which costs, but have no price in the given currency.
Syntax |
$Can = $ShippingMethod->canAddToBasket($hVars); |
Input |
|
Return |
|
lineItem
Returns information for adding a new shipping line item. Called for new baskets if this shipping methos is default or for existing baskets when the shipping method is changed.
Syntax |
my $hInfo = $ShippingMethod->lineItem($Container); |
Input |
|
Return |
|
recalculateLineItem
Recalculates the price of an existing shipping line item.
Syntax |
$ShippingMethod->recalculateLineItem($LineItem); |
Input |
|
valueToFreeDelivery
Returns the additional basket values required to get free delivery. Override this method if you want to display a message in the basket indicating the additional value required to get free shipping. If the return value is greater that 0, such a message is displayed in the basket page.
Syntax |
my $MissingValueForFreeDelivery = $ShippingMethod->valueToFreeDelivery($Container); |
Input |
|
Return |
|