|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for objects that are able to process shipping charges in the store.
Custom shipping processors must simply implement
ShippingProcessor
.
To change or add to the list of shipping processors currently active in the
system, modify the "activeShippingProcessors" setting in the
npcSetting
table of the database.
During checkout, the Struts layer invokes each of the
"activeShippingProcessors" by calling their
loadShippingOptions()
method to get a list of options related
to this ShippingProcessor
, and
processShipping(Map parameters)
to process the option that was
selected. The incoming Map
contains the
shippingOption
selected by the user, along with any other
request parameters.
The default "activeShippingProcessor" is
BasicShippingProcessor
.
Method Summary | |
java.util.Collection |
loadShippingOptions()
Load the shipping options related to this ShippingProcessor . |
java.util.Map |
processShipping(java.util.Map parameters)
Process the shipping charges for the current user's order. |
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject |
initialize |
Method Detail |
public java.util.Collection loadShippingOptions() throws java.lang.Exception
ShippingProcessor
.
Shipping options might include, for example, ground, 2-day air, bulk, etc.
The Collection
returned should be a collection of
Map
objects that must include the following keys:
String
code for the shipping option
under this shipping processor. E.g., "GROUND".String
name of the shipping option for
diplay to users. E.g., "Ground".String
and including currency formatting, for display to
the user.
Collection
of Map
objects that
contain the code, name, and price for each shipping option
related to this ShippingProcessor
.
java.lang.Exception
public java.util.Map processShipping(java.util.Map parameters) throws java.lang.Exception
Map
should contain a key named shippingOption
that contains the code
of the shipping option selected by
the user. It may also contain additional input parameters related to how
the shipping should be charged.
parameters
- A Map containing the shipping infofmation submitted by the
user. It should contain a key named
shippingOption
that contains the
code
of the shipping option selected by the
user.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |