The InterShipper module was developed to provide an easy solution to the multifaceted problem of online shipping. By enabling your online store to calculate shippinig costs on the fly from the carrier at the time of purchase, you can better plan for and account for shipping costs. The module doesn't address every shipping need, but does provide a good compromise.
The live shipping quotes are provided by the InterShipper service. The phpShop InterShipper module retreives shipping quotes from the InterShipper server by using the PHP InterShipper API class written by Desert Raven. The API class, ps_intershipper, performs some field validation, but is primarily responsible for assembling and interpreting the XML messages that are exchanged between the InterShipper server, and the phpShop online store. More information about the API can be found in the PHP InterShipper Class documentation included in this distribution. The primary class responsible for all of the phpShop InterShipper module functionality is the ps_ISship class. This class contains all of the module methods and properties accessible from the phpShop code. The more experience you have in php development and commerce application experience, the more you will get out of this module. At the moment, this module is only designed to calculate shipping costs, but the API also provides the ability to track shipments. This has not yet been developed into the module, but by mastering the phpShop code and studying the InterShipper API class, shipment tracking capabilities could easily be incorporated into your online store.
3 AUG 2000: Version 0.1 Initial development and testing. First release.
If you followed the installation instructions, you should have the ability to configure and activate the shipping methods you want to use in your online store. You should also have the example checkout and "thankyou" pages that allow the customer to choose a shipping method by cost, and see an invoice with shipping costs included. The checkout and "thakyou" pages are only provided as examples, and you are encouraged to develop your own. However, keep in mind that before a shipping quote request made, four requirements must be met.
The best way to meet the second requirement is to have a two step checkout process, and this is the way that the examples were developed.
One other requirement that is beyond the control of the developer is that the InterShipper server must accessible. There have been instances where the InterShipper is down, and your requests are ignored. I left the option of how to resolve this problem up to the developer. The module class, ps_ISship, contains a dummy function called default_method(). This method is called any time that the InterShipper server does not respond, or when the InterShipper module is deactivated in the phpshop.cfg file. This allows the developer to provide his own method of resolving shipping costs when he needs to.
boolean refresh() | Used to update the ISshipping database of shipping methods with a fresh query of the InterShipper server. WARNING: This method will delete the current contents of the IS_shipping table for that vendor. All shipping configurations will be lost. |
array ping() | Used to check InterShipper server status. Returns a multidimensional array $status[$carrier_name][$response_time]. |
boolean update($array) | Used to update the ISshipping database with ship method configuration changes. This function is called by the ISship_form.ihtml admin page. $vars must be an array of IS_shipping database fields and their values. The array can be multidimensional, keyed on the ship_method_id (e.g. $vars[$ship_method_id][$field][$value]). |
float get_weight($product_id) | Used to normalize all product weights. Returns product weight in ounces. |
boolean validate() | Used to validate that the InterShipper module is activated, and that all authorization variables exist. |
array fetch_quote($array) | Builds the quote request and submits the request to the InterShipper server by calling the ps_intershipper class function Quote(). Returns a multidimensional array containing the shipping cost, ship date, and delivery date by ship_method_id. See the session variable IS_ship. |
array default_method() | A dummy method that can be used to calculate shipping costs when the InterShipper server is down, or when the module is deactivated. |
error | The last error that occured. |
Table: IS_shipping | Primary Key: ship_method_id; Foreign Keys: vendor_id | |
ship_method_id | int(11) | Primary key. Not Null. Auto incremented. |
ship_carrier_id | varchar(12) | Unique carrier ID as recognized by the InterShipper server. Quotes returned from the InterShipper server contain only the ship carrier ID. |
ship_carrier_code | varchar(11) | Unique carrier code as recognized by the InterShipper server. Quote requests made to the InterShipper server require the carrier code (not the carrier ID. This is why both are needed). |
ship_carrier_name | varchar(32) | The natural name of the carrier. |
ship_method_code | varchar(11) | Each carrier offers several shipping methods. These methods are identified by the method code. The method code cannot be specified in a quote request, but all returned quotes are keyed on the method code. |
ship_method_name | varchar(32) | The natural name of the shipping method. |
ship_publish | char(1) | Boolean (Y|N). Used to determine whether the shipping method is "active". |
ship_handling_charge | decimal(4,2) | A decimal number specifying the amount to be charged per shipment. |
ship_handling_type | char(1) | (P|F) Identifies whether the handling charge is a (P)ercentage or (F)lat rate. |
ship_lead_time | int(3) | The amount of time to elapse between the order request and actual shipment. Assumed to be in days. |
ship_heavy | char(1) | Boolean (Y|N). Some shipping methods will not accept shipments over 200 pounds. This is to indicate those that do. |
ship_msg_header | text | Not currently used. |
ship_msg_footer | text | Not currently used. |
cdate | int(11) | Date that the shipment method was created. |
mdate | int(11) | Date that the shipment method was last changed. |
vendor_id | int(11) | Not Null. Foreign key to vendors. |
This document and the phpShop InterShipper module code was developed by Matt Oberpriller of Edikon, corp., and is released under the conditions of the pSPL. Edikon, corp. is not affiliated with InterShipper or Desert Raven in any way, and neither InterShipper nor Desert Raven are responsible for the operation of this module. Questions regarding this module should be submitted via the phpShop support mailing list phpshop-list@lists.sourceforge.net. Questions regarding the InterShipper service should be addressed to InterShipper.
MattOberpriller