osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Mvs V1.0

This is a discussion on Mvs V1.0 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; In November of 2007, USPS changed their api return code from lower case to upper case. We believe this to ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 12-03-2007, 01:41 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,100
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Mvs V1.0

In November of 2007, USPS changed their api return code from lower case to upper case. We believe this to be an error by USPS which has broken thousands of websites. For this reason, we will only post the text method to make this change and not provide a file or direct db change because we anticipate that it may change back despite USPS assurances that this unannounced change is now permanent.


In any case, for mvs, this is how you fix the problem:
/includes/modules/vendors_shipping/usps.php

change all cases of Express where is named ALONE, ie not Global Express Mail, to EXPRESS
change all cases of Priority where is named ALONE, ie not International Priority Mail, to PRIORITY
change all cases of First Class where is named ALONE, ie not First Class Mail International , to FIRST CLASS
change all cases of Parcel where is named ALONE, ie not International Parcel Post, to PARCEL

I can't list the exact locations for you because my usps.php file is changed, here is an example of a changed location

OLD:
CODE
$this->types = array('Express' => 'Express Mail',
'First Class' => 'First-Class Mail',
'Priority' => 'Priority Mail',
'Parcel' => 'Parcel Post');


NEW:
CODE
$this->types = array('EXPRESS' => 'Express Mail',
'FIRST CLASS' => 'First-Class Mail',
'PRIORITY' => 'Priority Mail',
'PARCEL' => 'Parcel Post');


After you make this change you STILL need to go in the DB and make some changes.

The first thing you need to do is unselect all but one of the USPS shipping options in the admin panel under USPS located under the Manage section for each vendor. We unselected all but Parcel as an example for each vendor. We then went into the table 'vendor_configuration' and edited all rows that match 'Domestic Shipping Methods' in the field 'configuration_title' and also shows USPS somewhere in the field of configuration_key. Once you have those rows ready to be edited in phpMyAdmin or your editor of choice upper case the values for the 'configuration_value' that you deselected. For example we changed our 'configuration_value' to

EXPRESS, PRIORITY, FIRST CLASS, Parcel

and make the same change to 'set_function' such as:

tep_cfg_select_multioption(array('EXPRESS', 'PRIORITY', 'FIRST CLASS', 'Parcel'),

Once these changes are made go back and enable the methods you just disabled and disable the method you left on. Now go back to your DB editor and change the final lower case term (Parcel in our example above) to upper case as we had done to the first the classes listed above.

More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -8. The time now is 08:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax