com.konakart.bl.modules.shipping.fedex
Class Fedex
java.lang.Object
com.konakart.bl.modules.BaseModule
com.konakart.bl.modules.shipping.BaseShippingModule
com.konakart.bl.modules.shipping.fedex.Fedex
- All Implemented Interfaces:
- ShippingInterface
public class Fedex
- extends BaseShippingModule
- implements ShippingInterface
This shipping module communicates with FedEx via a FedEx web service to retrieve shipping rates.
Using the Admin App you must set up the following configuration variables:
FedEx Module:
- MODULE_SHIPPING_FEDEX_KEY: FedEx Key
- MODULE_SHIPPING_FEDEX_PASSWORD: FedEx Password
- MODULE_SHIPPING_FEDEX_ACCOUNT_NUMBER: FedEx Account Number
- MODULE_SHIPPING_FEDEX_METER_NUMBER: FedEx Meter Number
- MODULE_SHIPPING_FEDEX_SERVICE_TYPE: FedEx Service type : If this is set, then we only return
a quote for this service
- MODULE_SHIPPING_FEDEX_SERVICE_TYPES_EXCLUDE: FedEx Service types to exclude : Comma separated
list of service types to exclude
- MODULE_SHIPPING_FEDEX_MEASUREMENT_UNIT: Measurement Unit : LBS or KGS
- MODULE_SHIPPING_FEDEX_PACKAGING_TYPE: Packaging type by weight : Defaults to
1000:YOUR_PACKAGING where YOUR_PACKAGING is the packaging type for up to 1000 Lbs or Kgs. You
could set it to something like 10:FEDEX_10KG_BOX,25:FEDEX_25KG_BOX,100:YOUR_PACKAGING which means
that from weight 0 to 10 we use a FEDEX_10KG_BOX. Then from weight 10 to 25 we use a
FEDEX_25KG_BOX etc. Before setting specific package codes you need to be sure that FedEx supports
the package for the destination.
- MODULE_SHIPPING_FEDEX_HANDLING: Handling fee : Defaults to 0. It is added to the charge
returned by FedEx.
- MODULE_SHIPPING_FEDEX_END_POINT_URL : The end point of the FedEx service (i.e.
https://gatewaybeta.fedex.com:443/web-services)
- MODULE_SHIPPING_FEDEX_DROP_OFF_TYPE : The type of drop off used. i.e. REGULAR_PICKUP,
BUSINESS_SERVICE_CENTER, DROP_BOX, REQUEST_COURIER, STATION
- MODULE_SHIPPING_FEDEX_RATE_REQUEST_TYPE : The rate request type i.e. ACCOUNT, LIST,
MULTIWEIGHT
Shipping and Packaging under Configuration
- Country of Origin : Country from which packages will be shipped.
- Postal Code : Postal code of area from which packages will be shipped
- Maximum package weight : This is used to split the order into multiple packages . We make
multiple calls to FedEx and sum the costs to create a total.
- Package tare weight : This is added to the weight of the items being shipped per package
|
Nested Class Summary |
protected class |
Fedex.StaticData
Used to store the static data of this module |
| Methods inherited from class com.konakart.bl.modules.BaseModule |
getBasketMgr, getCatMgr, getConfigMgr, getCurrMgr, getCustMgr, getEmailMgr, getEng, getLangMgr, getMultiStoreMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getResourceBundle, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, init, isAvailable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Fedex
public Fedex(KKEngIf eng)
throws org.apache.torque.TorqueException,
KKException,
com.workingdogs.village.DataSetException
- Constructor
- Parameters:
eng -
- Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException
getQuote
public ShippingQuote getQuote(Order order,
ShippingInfo info)
throws java.lang.Exception
- We get a quote from FedEx. If we only get one quote back then we return a ShippingQuote
object with the details of the quote. If we get back more than one quote then we create an
array of ShippingQuote objects and attach them to the ShippingQuote object that we return. In
this case all of the quotes must be in the array since the quote itself isn't processed.
It becomes more complex when we have the shipment split into a number of packages. The split
is done by the manager calling this method and is presented to us in an orderWeightList. For
each item in the list, we call FedEx and get back one or more quotes. We then have to add up
the quotes and return them as single quotes that can be displayed on the screen.
- Specified by:
getQuote in interface ShippingInterface
- Parameters:
order - The order object
- Returns:
- Returns a ShippingQuote object
- Throws:
java.lang.Exception
isAvailable
public boolean isAvailable()
throws KKException
- Returns true or false
- Specified by:
isAvailable in interface ShippingInterface
- Returns:
- True or False
- Throws:
KKException
setStaticVariables
public void setStaticVariables()
throws KKException
- Sets some static variables during setup
- Specified by:
setStaticVariables in interface ShippingInterface
- Throws:
KKException
Copyright © 2011 DS Data Systems UK Ltd.