sedex.php,v 1.0 2002/06/01 for OsCommerce 2.2 terrestre.php,v 1.0 2002/06/01 for OsCommerce 2.2 Released 1 Junne 2002 Released under the GNU General Public License ************************************************ NOTE: This is a Shipping Module designed for use in Brazil, based on a Auspost and NZ modules by Steve Kemp and Matt McKenzie, which was originally based on the Collissimo module by Cristian Lescuyer. Many thanks to them. The module allows you to send products to the states of Brazil, based on weight. Various weight Ranges and costs can be added to the module via admin. This module operates the same way as the zones module except that instead of being based on countries its based on zones within countries, so it will be easy to modify to suit any country. The Zone id's are taken from the 'zones' table of the sql. To use the sedex.php module it is necessary to change the zones (estados) as sedex recognise diferents costs for capital and interior of the same zone. (see included zones.sql) ******** TO INSTALL ********** You must perform 2 manual alterations: Insert the new zones into the zones table, use the included zones.sql In checkout_payment.php in the catalog directory find line 54 approx $address = tep_db_query("select entry_postcode as postcode, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "' and address_book_id = '" . $sendto . "'"); $address_values = tep_db_fetch_array($address); and replace with $address = tep_db_query("select entry_zone_id as zone_id, entry_postcode as postcode, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "' and address_book_id = '" . $sendto . "'"); $address_values = tep_db_fetch_array($address); Then replace your relevant current files with the files in the catalog folder. ******** IT IS STRONGLY SUGGESTED TO MAKE A BACK-UP OF THESE FILES FIRST ********** ******** TO DO ********** Alteration to allow you to set up as many zones as needed. Alteration to allow you to select zones required via a dropdown box similar to the tax setup. ******** KNOWN BUGS ********** For some reason, that i cant see at the moment, when the module is used it ads 10% to the displayed weight in the checkout, although it seems to calculate the shipping costs ok. ******** CREDITS ********** THANKS TO: Matt McKenzie - matt@compusys-nz.com for the NZ shipping module that this is directly based on. Christian Lescuyer - cl@goelette.net for the original Collissimo module, on which this is based. Steve Kemp - Snowtech Services - http://www.snowtech.com.au form the auspost module If you find any bugs please report to jose@magalhaes.net José Camillo de Magalhães