ZenMagick 0.9.6


org.zenmagick.model.checkout.ZMShippingProviderWrapper

Class ZMShippingProviderWrapper

ZMObject
|
+--ZMShippingProviderWrapper

public class ZMShippingProviderWrapper
extends ZMObject

Shipping provider.

A shipping provider may offer 1-n shipping methods, depending on the address, etc.

This is eventually going to be a replacement for the current ZMShippingProvider class, in combination with the new ZMShippingProviders service.

Author:
DerManoMann
Version:
$Id: ZMShippingProviderWrapper.php 2243 2009-05-27 04:19:40Z DerManoMann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMShippingProviderWrapper(mixed zenModule)

Create a new shipping provider.

Method Summary
array

getErrors()

Get the errors.

string

getIcon()

Get the icon.

int

getId()

Get the shipping provider id.

string

getName()

Get the shipping provider name.

array

getShippingMethods(ZMAddress address)

Get available shipping methods for the given address.

boolean

hasErrors()

Checks if errors are logged for this provider.

boolean

hasIcon()

Checks if an icon exists for this provider.

boolean

isInstalled()

Flags whether this shipping provider is installed or not.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMShippingProviderWrapper

public ZMShippingProviderWrapper(mixed zenModule)

Create a new shipping provider.

Parameters:
zenModule - A zen-cart shipping module instance.

Method Detail

getErrors

public array getErrors()

Get the errors.

Returns:
List of error messages.

getIcon

public string getIcon()

Get the icon.

Returns:
The icon.

getId

public int getId()

Get the shipping provider id.

Returns:
The shipping provider id.

getName

public string getName()

Get the shipping provider name.

Returns:
The shipping provider name.

getShippingMethods

public array getShippingMethods(ZMAddress address)

Get available shipping methods for the given address.

NOTE: There is currently no way to specify individual items. Basis for calculations is the current shopping cart.

Parameters:
address - The shipping address.
Returns:
A list of ZMShippingMethod instances.

hasErrors

public boolean hasErrors()

Checks if errors are logged for this provider.

Returns:
true if errors exist, false if not.

hasIcon

public boolean hasIcon()

Checks if an icon exists for this provider.

Returns:
true if an icon, false if not.

isInstalled

public boolean isInstalled()

Flags whether this shipping provider is installed or not.

Returns:
true if installed, false if not.

ZenMagick 0.9.6