Jump to content
Latest News: (loading..)
bburgess7

NOTICE: USPS is Updating Their APIs Jan. 27th, 2013-Test Servers Available Now.

Recommended Posts

I've modified the USPS Rate V4 Intl Rate V2 module to the new USPS API. The code is posted in the support thread for that module. Please test that code if you are using that module and let me know if it works for you.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Can anyone tell me where exactly the shipping costs are sent to USPS?

What program?

 

Every package is now showing up as 3 lbs 2 oz.

 

This even though the variable $shipping_weight in checkout_shipping.php shows the correct weight.

 

Anyone have any clues? This was working fine until the USPS change.

Share this post


Link to post
Share on other sites

The usps module sends the data to the USPS server, and it returns the shipping cost to the module. The module is /includes/modules/shipping/usps.php.

 

I haven't seen any weight problems after this change, nor should there be any given the minor changes involved.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I'm a bit lost--where should we be changing Parcel post to Standard in usps.php? Or what changes should we be doing to get everything up-to-date?

 

Thanks

 

Yes


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites

Can anyone tell me where exactly the shipping costs are sent to USPS?

What program?

 

Every package is now showing up as 3 lbs 2 oz.

 

This even though the variable $shipping_weight in checkout_shipping.php shows the correct weight.

 

Anyone have any clues? This was working fine until the USPS change.

 

Is it also calculating as 3lbs 2 oz?


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites

OK, mine is now working. Just three changes needed for my module:

 

From this: elseif ($request_type == 'Parcel PostRM') $service = 'PARCEL';

To this: elseif ($request_type == 'Standard PostRM') $service = 'PARCEL';

 

Then go to this paragraph:

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Methods (Domestic and International)', 'MODULE_SHIPPING_USPS_TYPES', '0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00', '<b><u>Checkbox:</u></b> Select the services to be offered<br><b><u>Minimum Weight (lbs)</u></b>first input field<br><b><u>Maximum Weight (lbs):</u></b>second input field<br><br>USPS returns methods based on cart weights. These settings will allow further control (particularly helpful for flat rate methods) but will not override USPS limits', '6', '0', 'tep_cfg_usps_services(array(\'First-Class MailRM Large Envelope\', \'First-Class MailRM Parcel\', \'Media MailRM\', \'Parcel PostRM\', \'Priority MailRM\', \'Priority MailRM Flat Rate Envelope\', \'Priority MailRM Legal Flat Rate Envelope\', \'Priority MailRM Padded Flat Rate Envelope\', \'Priority MailRM Small Flat Rate Box\', \'Priority MailRM Medium Flat Rate Box\', \'Priority MailRM Large Flat Rate Box\', \'Priority MailRM Regional Rate Box A\', \'Priority MailRM Regional Rate Box B\', \'Priority MailRM Regional Rate Box C\', \'Express MailRM\', \'Express MailRM Flat Rate Envelope\', \'Express MailRM Legal Flat Rate Envelope\', \'Express MailRM Flat Rate Boxes\', \'First-Class MailRM International Large Envelope**\', \'First-Class MailRM International Parcel**\', \'Priority MailRM International\', \'Priority MailRM International Flat Rate Envelope**\', \'Priority MailRM International Small Flat Rate Box\', \'Priority MailRM International Medium Flat Rate Box\', \'Priority MailRM International Large Flat Rate Box\', \'Express MailRM International\', \'Express MailRM International Flat Rate Envelope\', \'Express MailRM International Flat Rate Boxes\', \'USPS GXGTM Envelopes**\', \'Global Express GuaranteedRM (GXG)**\'), ', now())");

 

Change this: \'Parcel PostRM\',

To this: \'Standard PostRM\',

 

And this: \'First-Class MailRM International Parcel**\',

To this: \'First-Class Package International ServiceTM**\',

 

That's it. It is now showing Parcel Post rates as Standard Post rates and International Package rates, which are quite a bit higher.

 

Thanks everyone for all your input.

 

Shopgrl


  •  

Share this post


Link to post
Share on other sites

Hi. I have been having a problem with the USPS shipping since last Sunday afternoon. I have got the checkout_shipping page working in that it displays the USPS "Parcel Post"(or rather the Standard Post) price.

 

When I press the continue button, to go to the checkout_payment page, it reloads the checkout_shipping page and I am unable to get it to go to the next page.

 

I only use Parcel Post for my US deliveries and I am using v2.2 RC2a.

 

I have added a div just before the footer to display some variable names and values and the $method variable displays no value until I press the continue button and then the value becomes Standard Post, and reloads checkout_shipping.

 

When I go to the next page manually by changing the address to checkout_payment.php it works in that I am able to select from 1 of two payment methods, and then when I go to checkout_confirmation the price for the items is there, but shipping is missing.

 

The usps file I have is this one

 

/*

$Id: usps.php 6.1 by Kevin L Shelton on September 7, 2011

+++++ Original contribution by Brad Waite and Fritz Clapp ++++

++++ Revisions and Modifications made by Greg Deeth, 2008 ++++

Copyright 2008 osCommerce

Released under the GNU General Public License

//VERSION: 5.2.1 ALPHA LAST UPDATED: January 23rd, 2011 by Fulluv Scents

*/

 

Am I using the right usps file? How many different usps.php files are there?

 

What part of the code passes the needed variables to the checkout_payment page, and then on to the checkout confirmation page?

 

In the file I have there are no statements exactly like the ones Jeannie refers to.

 

Here is a screenshot of the div that displays some variables from checkout_shipping.php

 

 

 

http://www.nvrmiss.com/images/variables_screenshot.jpg[/img]

 

 

It has the correct weight and number of boxe, but no price. Note the $method variable is Standard Post, but when you land on that page from the shopping cart, $method shows no value.

 

Any help would be appreciated. I have worn an oval into the carpet these last few days.

 

Thank you Harold

Share this post


Link to post
Share on other sites

That looks like the old USPS Methods file. That code is such a mess that nobody wants to try to fix it. There are at least two others: the official USPS module included in osCommerce 2.3.3 and the USPS Rate V4, Intl Rate V2 addon.

 

I believe that the latter will work in 2.2 stores; you can check the support thread for more information. I've updated that module to work with the latest changes. The download link is in the support thread.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

That looks like the old USPS Methods file. That code is such a mess that nobody wants to try to fix it. There are at least two others: the official USPS module included in osCommerce 2.3.3 and the USPS Rate V4, Intl Rate V2 addon.

 

I believe that the latter will work in 2.2 stores; you can check the support thread for more information. I've updated that module to work with the latest changes. The download link is in the support thread.

 

Regards

Jim

 

USPS Rate V4, Intl Rate V2 does work in 2.2 shops, this latest USPS change prompted me to update all my sites of which 2 are the 2.2 version. Jetta's instructions include how to do it's for both 2.3 and 2.2 versions.


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Hi Jim and Steve

I have changed the USPS module to the latest one with the "Standard Post" changes, and I'm hopeful to get this working soon, but have run into some further difficulty.

 

After uninstalling the old module through admin, changing the usps.php to this one and then reinstalling through admin, when I try and edit the module I get the following error message.

 

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/nvrmiss/public_html/admin/modules.php(424) : eval()'d code on line 1

 

tep_cfg_usps_services is defined in my configuration table.

 

Is that error generated on line 424 in the modules.php file or does it mean something else?

 

I have changed the usps settings by going into the database and modifying them there,which brings me to a question.

 

I am only offering 1 service through usps, so what is the relationship between the configuration_values and set_function in MODULE_SHIPPING_USPS_TYPES.

 

It seems that there are 30 service requests in that set_function, so how should one go about restricting services through that way?

 

In the old module I could pick one value out of all of them and just use that value.

 

A test buy does not show how much shipping is, so some type of information is missing. I learned about getting an email to see what transpires between the website and usps from Jetta, and I have recieved a somewhat cryptic message:

 

<?xml version="1.0"?>

<Error><Number>-2147219085</Number><Source>Rate_Respond.;SOLServerRates.RateV4_Respond</Source><Description>Invalid XML Element content is incomplete according to the DTD/Schema.

line= 0 pos= 1668</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

I am unsure if these issues could be related, but any help would be welcome.

 

Thanks, Harold

Share this post


Link to post
Share on other sites

 

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/nvrmiss/public_html/admin/modules.php(424) : eval()'d code on line 1

 

tep_cfg_usps_services is defined in my configuration table.

 

 

Referencing the install instructions, make sure all the code dealing with this: function tep_cfg_usps_services is installed in admin/includes/functions/general.php, admin being whatever your admin is called


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Hi Steve Where can I find the install instructions? This is such a confusing problem.

 

Thanks, Harold

 

it's this one

http://addons.oscommerce.com/info/8327

 

 

 

http://addons.oscommerce.com/info/8327


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Here is my usps.php module. Was working great until USPS changed things with the new rates. I have messed with it over and over and it's still not showing correct rates for Standard Post. HELP PLEASE. If someone can fix it I could even email them the file, have them fix it, and then pay them a reasonable sum assuming it worked correctly. Anyone? Oh, I am running osCommerce V2.2 RC2. Ends up posting the entire file was too long so I had to cut it down...am hoping the part that needs correcting is included below. I have also attached it to this message, the entire file that is. chuck@lonestarchinchilla.com

 

If you want to see the actual store it is:

 

http://www.lonestarchinchilla.com/store

 

 

usps.php

 

<?php

/*

$Id: usps.php 6.1 by Kevin L Shelton on September 7, 2011

+++++ Original contribution by Brad Waite and Fritz Clapp ++++

++++ Revisions and Modifications made by Greg Deeth, 2008 ++++

Copyright 2008 osCommerce

Released under the GNU General Public License

//VERSION: 5.2.1 ALPHA LAST UPDATED: January 23rd, 2011 by Fulluv Scents

*/

 

// Incorporate the XML conversion library

if (PHP_VERSION >= '5.0.0') { // PHP 5 does not need to use call-time pass by reference

require_once (DIR_WS_CLASSES . 'xml_5.php');

} else {

require_once (DIR_WS_CLASSES . 'xml.php');

}

 

if ( !function_exists('htmlspecialchars_decode') ) {

function htmlspecialchars_decode($text) {

return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));

}

}

// Sets up USPS Class

class usps {

 

// Sets Variables

var $code, $title, $description, $icon, $enabled, $countries;

 

function usps() {

global $order, $packing;

$this->code = 'usps';

$this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;

$this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;

$this->icon = DIR_WS_ICONS . 'shipping_usps.gif';

$this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) {

$check_flag = false;

$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");

while ($check = tep_db_fetch_array($check_query)) {

if ($check['zone_id'] < 1) {

$check_flag = true;

break;

} elseif ($check['zone_id'] == $order->delivery['zone_id']) {

$check_flag = true;

break;

}

}

if ($check_flag == false) {

$this->enabled = false;

}

}

if (defined('SHIPPING_DIMENSIONS_SUPPORT') && SHIPPING_DIMENSIONS_SUPPORT == 'Ready-to-ship only') {

$this->dimensions_support = 1;

} elseif (defined('SHIPPING_DIMENSIONS_SUPPORT') && SHIPPING_DIMENSIONS_SUPPORT == 'With product dimensions') {

$this->dimensions_support = 2;

} else {

$this->dimensions_support = 0;

}

$this->countries = $this->country_list();

$this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;

$this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;

$this->sig_conf_thresh = MODULE_SHIPPING_USPS_SIG_THRESH;

$options = explode(', ', MODULE_SHIPPING_USPS_OPTIONS);

$this->display_weight = in_array('Display Weight', $options);

$this->display_transit = in_array('Display Transit Time', $options);

$this->display_insurance = in_array('Display Insurance', $options);

$this->display_confirmation = in_array('Display Sig./Del. Confirmation', $options);

$this->types = array(

'Express Mail' => 'Express Mail<sup>®</sup>',

'Express Mail Hold For Pickup' => 'Express Mail<sup>®</sup> Hold For Pickup',

'Express Mail Sunday/Holiday Delivery' => 'Express Mail<sup>®</sup> Sunday/Holiday Delivery',

'Express Mail Flat Rate Envelope' => 'Express Mail<sup>®</sup> Flat Rate Envelope',

'Express Mail Flat Rate Envelope Hold For Pickup' => 'Express Mail<sup>®</sup> Flat Rate Envelope Hold For Pickup',

'Express Mail Sunday/Holiday Delivery Flat Rate Envelope' => 'Express Mail<sup>®</sup> Sunday/Holiday Delivery Flat Rate Envelope',

'Express Mail Legal Flat Rate Envelope' => 'Express Mail<sup>®</sup> Legal Flat Rate Envelope',

'Express Mail Legal Flat Rate Envelope Hold For Pickup' => 'Express Mail<sup>®</sup> Legal Flat Rate Envelope Hold For Pickup',

'Express Mail Sunday/Holiday Delivery Legal Flat Rate Envelope' => 'Express Mail<sup>®</sup> Sunday/Holiday Delivery Legal Flat Rate Envelope',

'Priority Mail' => 'Priority Mail<sup>®</sup>',

'Priority Mail Hold For Pickup' => 'Priority Mail<sup>®</sup> Hold For Pickup',

'Priority Mail Large Flat Rate Box' => 'Priority Mail<sup>®</sup> Large Flat Rate Box',

'Priority Mail Large Flat Rate Box Hold For Pickup' => 'Priority Mail<sup>®</sup> Large Flat Rate Box Hold For Pickup',

'Priority Mail Medium Flat Rate Box' => 'Priority Mail<sup>®</sup> Medium Flat Rate Box',

'Priority Mail Medium Flat Rate Box Hold For Pickup' => 'Priority Mail<sup>®</sup> Medium Flat Rate Box Hold For Pickup',

'Priority Mail Small Flat Rate Box' => 'Priority Mail<sup>®</sup> Small Flat Rate Box',

'Priority Mail Small Flat Rate Box Hold For Pickup' => 'Priority Mail<sup>®</sup> Small Flat Rate Box Hold For Pickup',

'Priority Mail Regional Rate Box A' => 'Priority Mail<sup>®</sup> Regional Rate Box A',

'Priority Mail Regional Rate Box A Hold For Pickup' => 'Priority Mail<sup>®</sup> Regional Rate Box A Hold For Pickup',

'Priority Mail Regional Rate Box B' => 'Priority Mail<sup>®</sup> Regional Rate Box B',

'Priority Mail Regional Rate Box B Hold For Pickup' => 'Priority Mail<sup>®</sup> Regional Rate Box B Hold For Pickup',

'Priority Mail Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Flat Rate Envelope',

'Priority Mail Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Flat Rate Envelope Hold For Pickup',

'Priority Mail Legal Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Legal Flat Rate Envelope',

'Priority Mail Legal Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Legal Flat Rate Envelope Hold For Pickup',

'Priority Mail Padded Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Padded Flat Rate Envelope',

'Priority Mail Padded Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Padded Flat Rate Envelope Hold For Pickup',

'Priority Mail Gift Card Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Gift Card Flat Rate Envelope',

'Priority Mail Gift Card Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Gift Card Flat Rate Envelope Hold For Pickup',

'Priority Mail Small Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Small Flat Rate Envelope',

'Priority Mail Small Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Small Flat Rate Envelope Hold For Pickup',

'Priority Mail Window Flat Rate Envelope' => 'Priority Mail<sup>®</sup> Window Flat Rate Envelope',

'Priority Mail Window Flat Rate Envelope Hold For Pickup' => 'Priority Mail<sup>®</sup> Window Flat Rate Envelope Hold For Pickup',

'First-Class Mail Parcel' => 'First-Class Mail<sup>®</sup> Parcel',

'First-Class Mail Parcel Hold For Pickup' => 'First-Class Mail<sup>®</sup> Parcel Hold For Pickup',

'First-Class Mail Large Envelope' => 'First-Class Mail<sup>®</sup> Large Envelope',

'First-Class Mail Letter' => 'First-Class Mail<sup>®</sup> Letter',

'Parcel Post' => 'Standard PostRM<sup>®</sup>',

'Media Mail' => 'Media Mail<sup>®</sup>',

'Library Mail' => 'Library Mail'

);

$this->type_to_request = array(

'Express Mail' => 'Express Commercial',

'Express Mail Hold For Pickup' => 'Express HFP Commercial',

'Express Mail Sunday/Holiday Delivery' => 'Express SH Commercial',

'Express Mail Flat Rate Envelope' => 'Express Commercial',

'Express Mail Flat Rate Envelope Hold For Pickup' => 'Express HFP Commercial',

'Express Mail Sunday/Holiday Delivery Flat Rate Envelope' => 'Express SH Commercial',

'Express Mail Legal Flat Rate Envelope' => 'Express Commercial',

'Express Mail Legal Flat Rate Envelope Hold For Pickup' => 'Express HFP Commercial',

'Express Mail Sunday/Holiday Delivery Legal Flat Rate Envelope' => 'Express SH Commercial',

'Priority Mail' => 'Priority Commercial',

'Priority Mail Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Large Flat Rate Box' => 'Priority Commercial',

'Priority Mail Large Flat Rate Box Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Medium Flat Rate Box' => 'Priority Commercial',

'Priority Mail Medium Flat Rate Box Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Small Flat Rate Box' => 'Priority Commercial',

'Priority Mail Small Flat Rate Box Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Regional Rate Box A' => 'Priority Commercial',

'Priority Mail Regional Rate Box A Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Regional Rate Box B' => 'Priority Commercial',

'Priority Mail Regional Rate Box B Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Legal Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Legal Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Padded Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Padded Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Gift Card Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Gift Card Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Small Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Small Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'Priority Mail Window Flat Rate Envelope' => 'Priority Commercial',

'Priority Mail Window Flat Rate Envelope Hold For Pickup' => 'Priority HFP Commercial',

'First-Class Mail Parcel' => 'First Class Commercial',

'First-Class Mail Parcel Hold For Pickup' => 'First Class HFP Commercial',

'First-Class Mail Large Envelope' => 'First Class',

'First-Class Mail Letter' => 'First Class',

'Parcel Post' => 'Parcel',

'Media Mail' => 'Media',

'Library Mail' => 'Library'

);

$this->type_to_container = array(

'Express Mail' => '',

'Express Mail Hold For Pickup' => '',

'Express Mail Sunday/Holiday Delivery' => '',

'Express Mail Flat Rate Envelope' => 'Flat Rate Envelope',

'Express Mail Flat Rate Envelope Hold For Pickup' => 'Flat Rate Envelope',

'Express Mail Sunday/Holiday Delivery Flat Rate Envelope' => 'Flat Rate Envelope',

'Express Mail Legal Flat Rate Envelope' => 'Legal Flat Rate Envelope',

'Express Mail Legal Flat Rate Envelope Hold For Pickup' => 'Legal Flat Rate Envelope',

'Express Mail Sunday/Holiday Delivery Legal Flat Rate Envelope' => 'Legal Flat Rate Envelope',

'Priority Mail' => '',

'Priority Mail Hold For Pickup' => '',

'Priority Mail Large Flat Rate Box' => 'LG Flat Rate Box',

'Priority Mail Large Flat Rate Box Hold For Pickup' => 'LG Flat Rate Box',

'Priority Mail Medium Flat Rate Box' => 'MD Flat Rate Box',

'Priority Mail Medium Flat Rate Box Hold For Pickup' => 'MD Flat Rate Box',

'Priority Mail Small Flat Rate Box' => 'SM Flat Rate Box',

'Priority Mail Small Flat Rate Box Hold For Pickup' => 'SM Flat Rate Box',

'Priority Mail Regional Rate Box A' => 'Regional Rate Box A',

'Priority Mail Regional Rate Box A Hold For Pickup' => 'Regional Rate Box A',

'Priority Mail Regional Rate Box B' => 'Regional Rate Box B',

'Priority Mail Regional Rate Box B Hold For Pickup' => 'Regional Rate Box B',

'Priority Mail Flat Rate Envelope' => 'Flat Rate Envelope',

'Priority Mail Flat Rate Envelope Hold For Pickup' => 'Flat Rate Envelope',

'Priority Mail Legal Flat Rate Envelope' => 'Legal Flat Rate Envelope',

'Priority Mail Legal Flat Rate Envelope Hold For Pickup' => 'Legal Flat Rate Envelope',

'Priority Mail Padded Flat Rate Envelope' => 'Padded Flat Rate Envelope',

'Priority Mail Padded Flat Rate Envelope Hold For Pickup' => 'Padded Flat Rate Envelope',

'Priority Mail Gift Card Flat Rate Envelope' => 'Gift Card Flat Rate Envelope',

'Priority Mail Gift Card Flat Rate Envelope Hold For Pickup' => 'Gift Card Flat Rate Envelope',

'Priority Mail Small Flat Rate Envelope' => 'SM Flat Rate Envelope',

'Priority Mail Small Flat Rate Envelope Hold For Pickup' => 'SM Flat Rate Envelope',

'Priority Mail Window Flat Rate Envelope' => 'Window Flat Rate Envelope',

'Priority Mail Window Flat Rate Envelope Hold For Pickup' => 'Window Flat Rate Envelope',

'First-Class Mail Parcel' => '',

'First-Class Mail Parcel Hold For Pickup' => '',

'First-Class Mail Large Envelope' => '',

'First-Class Mail Letter' => '',

'Parcel Post' => '',

'Media Mail' => '',

'Library Mail' => ''

);

usps.php


- Chuck

External links are not allowed on the osC forum. Thanks

Share this post


Link to post
Share on other sites

Hi Charles I had a similar problem, and I use the same module.

 

I think the line below, which is in your "types" array should be 'Standard PostRM' => 'Parcel Post<sup>®</sup>',

 

'Parcel Post' => 'Standard PostRM<sup>®</sup>',

 

In my file it reads 'Standard Post' => 'Parcel Post<sup>®<sup> without the RM at the end of Standard Post

 

 

$this->types = array(

 

//'Parcel Post' => 'Standard PostRM<sup>®</sup>',

'Standard PostRM'=> 'Parcel Post<sup>®</sup>',

);

 

 

There is some confusion about what to change in what file, and there are at least two main usps.php modules.

 

The one I use is USPS Methods6_1a and the other module is USPS Rate V4 Intl Rate V2 - v.1.0

 

If anyone can point me to another one, please do.

 

USPS Rate V4 INTL Rate V2 -v.1.0 was modified by Jim to account for the Standard Post terminology used by USPS.

 

Good luck, Harold

Share this post


Link to post
Share on other sites

@@cnchal There is also a USPS module included in the osC 2.3.3 distribution. It appears to be based on the USPS Methods module, but it's not identical.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Jim, it was the modifications you made in the Rate V4 module that twigged me to the change needed for what worked for me. Thank you.

 

I tried installing Rate V4 and I could not get it to work. The error messages I received are still unsolved. Once I put the old module back with only that line change, it went to the checkout_payment page by clicking the continue button. Simple really, in hindsight and having read quite a bit of the forums in trying to find answers, an annual event.

 

You have to use xml5.php with the methods module, but it isn't used with the RateV4 module, a notable difference.

 

As I understand this now, and please correct me if wrong, at the point where the incoming response from USPS is read, the value is Standard Post, but it needs to be translated to Parcel Post to work with the rest of the code in the file, and to pass the shipping amount along to the next page.

 

When I get a chance, I will have a look at the module in osC 2.3.3.

Share this post


Link to post
Share on other sites

chchal,

 

I did what you said above and it did show parcel post okay but when going to checkout it put in the express mail price instead of the Parcel Post (or Standard Post) rates. Very bad. I'm still at a loss as to how to get everything working okay. I put in a temporary flat rate price in the meantime but I am losing money most of the time on shipping when customers select it. Very frustrating but I do appreciate your help. Sigh.


- Chuck

External links are not allowed on the osC forum. Thanks

Share this post


Link to post
Share on other sites

If you want to use the USPS Rate V4 Intl Rate V2 module, you need to install the full package from the Addons section first, then overwrite the module file with the one I modified. It should then return all of the correct rates.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

We are getting an error message for domestic rates: An error occured with the USPS shipping calculations.

If you would like to use USPS as your shipping method, please contact the store owner.

 

We have checked and unchecked domestic Priority Mail, Express Mail, and Standard Post, but no luck We keep getting this error message. International is working fine, so it's a issue with the domestic quotes. Any ideas? We are desperate!!

Share this post


Link to post
Share on other sites

Could our error have anything to do with how the new "standard" post is listed in includes/modules/shipping/usps.php?

 

line 110: 'Standard Post' => 'Standard Post<sup>®</sup>',

line 156: 'Standard Post' => 'Parcel Post',

Share this post


Link to post
Share on other sites

krdito -

 

There are 4 arrays at the beginning of the file, and the only change I made was to the "types" array. I think your line 156 is in the "type_to_request" array and I left mine at:

 

'Parcel Post' => 'Parcel Post',

 

 

Your line 110 should be in the "types" array and my line in the types array is

 

'Standard Post' => 'Parcel Post<sup>®</sup>',

Share this post


Link to post
Share on other sites

cnchal - I made your changes as suggested above, but the error message remains. Is there other code that can be posted to help sort this out? Thank you for your help! We would appreciate any other suggestions!

Share this post


Link to post
Share on other sites

@@krdito

please note my disclaimer in my signature but in response to your matter i'd say that from what i gather from other postings in this thread and elsewhere there are at least a couple working versions of usps postage add ons. i am using the one that Jim mentions in post #45 above. With the update he just did that module works fine. that's this add on origninallyby fulluvscents: http://addons.oscommerce.com/info/8327. Jim's mod would need applied to that add on then.


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×