------------------------------------------------------------------------------------
 Ship In Cart (aka Shipping Estimator) v2.2.2

  Designed for:
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

   Released under the GNU General Public License
  
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
------------------------------------------------------------------------------------

If you appreciate all the hard work I put into my mods, please consider donating to sales@nexuspc.com  :)


=================================================================
::: CHANGELOG :::
=================================================================

Ship In Cart Product Page 2008-12-09
- Added product page option as well. Nothing needs to be in the cart will add current product to calculation, obviously optional.

2.2.2b : sunrise99 2011-03-06
- adding 2 New images by decapper 5 Jan 2009  
- adding First Timers or single address bug fix dr_lucas 27 Jul 2009  

2.2.2a : sitandspin: 2008-03-12
- fixed issue with RC2.2a shopping_cart.php layout (see installation instructions Step 4 below)

2.2.2 : lthown : 2008-03-11
- fixed issue with UPS XML shipping module - the two letter state code wasn't stored and UPS XML needs it


2.2.1 : surfalot : 2006-09-23
- fixed problem with Ship In Cart not showing to visitors (not logged in) 
  (this is the way it's suppose to work azer, this is most beneficial to new customers)  :)
- fixed a cross contribution contamination. tep_output_warning() is not included in this
  contribution or the standard shop, and was removed to prevent the error.
- Added optional instructions that will display a message when no shipping options are returned
  from the shippers (see: Install_optional.txt in this package)
- updated SQL script so that items inserted will use the next available configuration_id instead of
  the hard-coded ids that may already have been used.

2.20 : full package by azer
- Removed forgotten hard coded word ( items:) and added a define to language file
- Cosmetic changes

2.10 : full package by azer using fix
- made a new full package using 2.00 + fix by Asheron
- Removed hard coded language and added a define to language file

2.0 : Improvements since v1.83
- All options now controlled via the Admin CP.  Module can be turned on/off via Admin CP as well.
- Now partially compatible with multi-language sites (Language defines moved to seperate language file - I say 'partial' b/c I did not correct every instance of hard-coded english)
- Table display optimized/improved (in my humble opinion - if you don't think so, use the previous version)  A screenshot is included (with buyer name/address removed of course)
- 'Free Shipping' display fixed to match regular shipping display

* JonoB added: (v1.83, 2004/05/16)
- Ability to switch certain parts on or off via the defines section of shipping_estimator.php
- Fixed some small spelling mistakes

* Justin Baldwin added:
- MS2 compatibility
- Update button
- Various removals
- Fed Ex Real Time Quotes compatibility

* Linda McGrath (osCommerce@WebMakers.com) added:
- This now handles Free Shipping for orders over $total as defined in the Admin
- This now shows Free Shipping on Virtual products
- Everything is contained in an infobox for easier placement.

* Edwin Bekaert (edwin@ednique.com)
- Original version


=================================================================
::: SUPPORT :::
=================================================================
Since azer started a support thread in the dev section and is not watching
any posts, I will be supporting my changes in the original thread:

http://forums.oscommerce.com/index.php?showtopic=38411


azer's thread (if anyone is watching it)
Support Thread:  http://forums.oscommerce.com/index.php?showtopic=178824



=================================================================
::: INSTRUCTIONS :::
=================================================================

(1) Run the included SQL.  Please note: SQL assumes that you do not currently have 
configuration_group_id 19 in your configuration_group table. You should check that
id 19 is not taken before running this script in your phpMyAdmin or similar database
management tool supplied by your host.

if you do have an id of 19, then you should be able to safely to a search and 
replace in the SQL.txt file included in this package. Simply search for 19 and
replace with the next available configuration_group_id in your table.


===============================

(2) /catalog/images/icons/ (in included folder)

Choose an icon which suits your site or create one of your own.  
Rename the one you choose to 'selected.gif'  Delete the rest.


===============================

(3) Copy all included new files to the appropriate directories.  
These will not overwrite any existing files unless you have previously 
installed a version of this mod.


===============================

(4)  /catalog/shopping_cart.php

FIND: (dependant on osC version)

<?php
  } else {
?>
      <tr>
        <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
      </tr>

- OR -

<?php
      } else {
    ?>
          <tr>
            <td align="center" class="main"><?php echo TEXT_CART_EMPTY; ?></td>
          </tr>


ADD ABOVE:

      </form><tr>
        <td><br><?php if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'shipping_estimator.php'); } else {}; ?></td>
      </tr>

- OR - if you are running osC RC2.2a

FIND: 

      <tr>
        <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
      </tr>

ADD BELOW:

      </form><tr>
        <td><br><?php if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'shipping_estimator.php'); } else {}; ?></td>
      </tr>

====================================

(5) /catalog/includes/filenames.php

ADD anywhere before the last ?> in the file:


  define('FILENAME_SHIPPING_ESTIMATOR', 'shipping_estimator.php');


====================================

(Optional)

(6) See optional instructions that will display a message when no shipping options are returned
    from the shippers (see: Install_optional.txt in this package)

(7) Add to products page
upload includes/modules/product_shipping_estimator.php

In product info where you want it

<tr>
    <td>
<br>
<?php
    $cart->add_cart($product_info['products_id']); //add current to cart for estimator

 if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'product_shipping_estimator.php'); } else {}; 
    $cart->remove($product_info['products_id']);   //lets remove current product from cart
?>
    </td>
</tr>













