ePages 6.11.0 - DE_EPAGES/Colissimo/API/Object/ShippingMethodColissimo.pm

Package DE_EPAGES::Colissimo::API::Object::ShippingMethodColissimo

Object interface for ShippingMethodColissimo.

Functions

canAddToBasket
featureName
getLevels
levels
usableAtStorefront

canAddToBasket

Tests if a shipping method can be added to the basket with the given currency. Overrides function DE_EPAGES::Order::API::Object::ContainerPaymentMethod::canAddToBasket The shipping method can be added to the container if the currency of the container is 'EUR'

Syntax
if ($ShippingMethod->canAddToBasket($hVars));
Input
$hVars (ref.hash)
  • CurrencyID - alpha currency code (ISO 4217) - char(3)
  • TaxModel - gross or net price - int
Return
$canAddToBasket (boolean)
true if shipping method can be used for the given currency

featureName

Returns the feature name 'Colissimo'.

Syntax
$FeatureName = $ShippingMethodColissimo->featureName;
Return
$FeatureName (String)
feature name (undef means no feature count)

getLevels

Return the shipping levels for the given currency in the requested tax model. overwrite parents method, this is necessary because of two methods are combined within this method.

Syntax
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel);
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel, $ExtraPrecision);
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel, $ExtraPrecision, $getLimitLevels);
Input
$CurrencyID (char(3))
currency id
$TaxModel (int)
tax model (1=gross/including tax, 0=net/without tax)
$ExtraPrecision ((optinal, default=0) returns the levels for LimitShippingMethod)
(optional, default=0) extra precision for net prices
in back-office | boolean
$getLimitLevels
Return
$ahLevels (int)
list of hashes, keys:
BaseValue, LowerBound, UpperBound, Multiplier, ShippingLevelID

levels

Returns all shipping level objects of that shipping method. overwrite parents method, this is necessary because of two methods are combined within this method.

Syntax
$aShippingLevels = $Object->levels;
Return
$aShippingLevels (ref.array.object)
list of shipping level opbjects

usableAtStorefront

Tests if the shipping method is usable in the storefront. overwrites DE_EPAGES::Shipping::API::Object::ShippingMethod.usableAtStorefront

Syntax
$Usable = $ShippingMethod->usableAtStorefront();
Input
---
Return
$Usable (boolean)
true if shipping method is usable in the storefront