Package DE_EPAGES::ShippingOption::API::Object::ShippingOption
object interface for ShippingOption.
Base |
DE_EPAGES::Object::API::Object::Object |
Functions
addToContainer
Adds lineItem of shipping option to line item container.
Syntax |
$LineItem = $Object->addToContainer( $Container, $hInfo ); |
Input |
|
Return |
|
canAddToBasket
Tests if a shipping option can be added to the basket with the given currency. Uses function DE_EPAGES::ShippingOption::API::Object::ShippingOption::price to evaluate if shipping option has a price (price can be 0).
Syntax |
$ShippingOption->canAddToBasket($hVars); |
Input |
|
Return |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $ShippingOption->className; |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $ShippingOption->dbPackage; |
Return |
|
price
Returns the price by the given requirements. If no price exists, 0 will be returned.
Syntax |
$Price = $ShippingOption->price( $hVars ); |
Example |
$Price = $ShippingOption->price( { CurrencyID => 'USD', TaxModel => $ShippingOption->getSite()->get('TaxModel'), ExtraPrecision => 1, } ); |
Input |
|
Return |
|
recalculateLineItem
Recalculate a shipping option line item when something has changed on basket, for example if a different currency was chosen.
Syntax |
$Object->recalculateLineItem( $LineItem, $hInfo ); |
Input |
|
setPrice
Sets the list price of this shipping option.
Syntax |
$Product->setPrice($CurrencyID, $TaxModel, $Value); |
Example |
use DE_EPAGES::Shop::API::Constants qw( TAX_MODEL_GROSS TAX_MODEL_NET ); $Product->setPrice('EUR', TAX_MODEL_GROSS, 19.99); |
Input |
|
Return |
|