
Installation of the phpShop InterShipper shipping module.

*************
QUICK INSTALL
*************

You must, of course, already have a working installation of phpShop. This
module was developed using phpShop version 0.42, but has been tested to
work with phpShop 0.45.


1.  Uncompress the phpShop InterShipper module in your "phpshop/modules"
    directory. The following directories will be created:

    ISshipping			<- module ROOT
    ISshipping/html		<- module administrative pages & templates
    ISshipping/lib		<- module and InterShipper API class libraries
    ISshipping/sql		<- module SQL code
    ISshipping/doc		<- module and InterShipper API documentation
    ISshipping/examples		<- example checkout pages


2.  Update the calc_order_shipping() function in
    "phpshop/modules/checkout/lib/ps_order_process.inc" as follows:

   function calc_order_shipping($d) {

      if (IS_ENABLE) {
        // Intershipper calculation
        $ps_shipping = new ps_shipping;

        if(!($quotes = $ps_shipping->fetch_quote($d)))
          return(0);

        while (list($key,$val)=each($quotes)) {
          if (strcmp($key,$d["ship_method_id"]) == 0)
          $quote = $val;
        }

      return($val);
      }
      else  // No shipping calculation so return 0
         return(0);
   }


3.  Update the email_receipt() function in
    "phpshop/modules/checkout/lib/ps_order_process.inc" as follows:

    Uncomment the following lines:

    $order_shipping = $db->f("order_shipping");
    $shopper_message .= "SHIPPING = ";
    $shopper_message .= sprintf("%1.2f\n", $order_shipping);


4.  Insert the following somewhere in your
    "phpshop/etc/phpshop.cfg" file:

    # InterShipper Directives
    # -----------------------
    "IS_ENABLE"			=>	"1",
    "IS_PASSWORD"		=>	"<Your InterShipper Password>",
    "IS_EMAIL"			=>	"<Your InterShipper Email Address",
    
    ** NOTE: IS_ENABLE accepts the boolean 1|0 (on|off).
             IS_PASSWORD should be your InterShipper password.
             You must register with InterShipper to get your InterShipper
             password.
             IS_EMAIL should be the email address you registered
             under with InterShipper.

             Visit http://www.intershipper.com to register an account with
             InterShipper. Registration is free :)

 
5.  Create the IS_shipping table, and load the module information into the
    phpShop database by executing the IS_shipping.sql code:

    mysql -u <username> -p <password> -h <hostname> phpshop < \
    phpshop/modules/ISshipping/sql/IS_shipping.sql


6.  Install the example checkout pages to your checkout module.

    a) make a backup copy of phpshop/modules/checkout/html/index.ihtml
    b) make a backup copy of phpshop/modules/checkout/html/thankyou.ihtml
    c) copy phpshop/modules/ISshipping/examples/checkout_step_1.ihtml to
       phpshop/modules/checkout/html/index.ihtml.
    d) copy phpshop/modules/ISshipping/examples/checkout_step_2.ihtml to
       phpshop/modules/checkout/html.
    e) copy phpshop/modules/ISshipping/examples/checkout_thankyou.ihtml to
       phpshop/modules/checkout/html/thankyou.ihtml.


That's it!  Log into your store as the admin user, and go to the Administration
pages.  Shipping should now be available as one of your choices on the top
menu.  The first time you access the Configure Shipping Methods section, the
module will attempt to retreive a list of shipping methods from the
InterShipper server.  If after several seconds a page appears with a list of
shipping methods, you're ready to go. Read the README file for important
information regarding this module, and the ps_intershipper_module.html for
detailed information on this modules methods, and how to integrate the module's
funtionality into your store.

Let us know what you think about this module, or if anything goes wrong.
This is an alpha release of this module.  Even though considerable testing
has been done, there are sure to be some problems.

Report any bugs at: 

    http://www.sourceforge.net/bugs/?group_id=747

Support questions should be submitted via the support forum at:

    http://www.phpshop.org

