Jump to content
fulluvscents

USPS Rate V4, Intl Rate V2 (official support thread)

Recommended Posts

If you have a database backup, and you should, you can look in the configuration table for the value associated with the key MODULE_SHIPPING_USPS_USERID. If not, you can call the USPS and see if they can help recover it, or you can apply for a new one.

 

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

Ok,

 

Thank you, I lost our international first class package option so I uploaded your new usps.php but it is still not showing up?

 

Maybe I did not upload it to the correct place, please advise

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

Did you uninstall your old module before uploading the new one? If not, do that now. Write down your settings and ID first.

 

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

Yea that is what I forgot to do :(

 

Hopefully USPS will not take all day to get back to me


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

you could add something like this on the checkout_shipping.php page. (catalog/checkout_shipping.php or such depending where your shop is installed)

 

I looked at the page in question, but I couldn't determine where I could add a note/text in it to be visible on the checkout screen. Could you tell me which text to look for that I can add it into it? Thanks!

Share this post


Link to post
Share on other sites

I looked at the page in question, but I couldn't determine where I could add a note/text in it to be visible on the checkout screen. Could you tell me which text to look for that I can add it into it? Thanks!

 

What that code is doing is assembling the data needed to make the page then generating the page. Take a look toward the bottom of the code on that page and that's pretty much where the web page page is constructed. Somewhere toward the bottom is where you could put your message in html format. But be careful as you can screw things up placing the code in the wrong place or using incorrect coding. So backup your files.

 

Maybe Plan B would be to go to the language file for shipping..../includes/languages/english/modules/shipping/usps.php and try something there. Same disclaimer as before.

 

Testing such changes locally using software letting you do this on you local computer first is really the way to go in doing such work. It saves a lot of pain and aggravation.


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

Thank you for the details. I found the ideal place to include it in the catalog/checkout_shipping.php file. I searched for TABLE_HEADING_SHIPPING_METHOD; and found this section around line 254:

 

<tr>

<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>

</tr>

 

and replaced it with:

<tr>

<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b><font color="brown"> <b>Note:</b> For USPS flat rate shipping selections, call first for details.</font></td>

</tr>

 

This added the message on the checkout screen just above the shipping options and to the right of "Shipping Method" label.

 

Worked perfectly!!

 

Thanks again,

Steve

Share this post


Link to post
Share on other sites

@@REALGOODEAL We are checking that the value is set -- PHP is objecting to the check. Try changing that line in usps.php to this:

 

 if (@ isset($iExtras[$val['ServiceName']]) && tep_not_null($iExtras[$val['ServiceName']]) && ((MODULE_SHIPPING_USPS_RATE_TYPE == 'Online' && $val['AvailableOnline'] == 'True') || (MODULE_SHIPPING_USPS_RATE_TYPE == 'Retail' && $val['Available'] == 'True')))

 

The second error you are getting is a result of the first error.

 

@@rajkumaralma Do you have that service selected in the module setup? Is your product weight lees than the USPS maximum?

 

Regards

Jim

 

That did it. No errors are being returned and everything seems to be running smoothly. Thanks so much!

Share this post


Link to post
Share on other sites

Hello,

 

I just received the USPS API User ID and Password via email. They require me to use that on their test server, and print out ten successful result code for them before they switch me to the production server.

 

The default USPS module in the osCommerce 2.3.3 doesn't has the testing function.

 

Please teach me how to do this test and print out the result. Is there any add-on for this? I can't find it in the add-on page.

 

BTW, I am new to the osCommerce system, this is the first time for me to set-up an on-line shopping cart.

 

Thank you.

Share this post


Link to post
Share on other sites

Just tell them you're on osCommerce. The module has already been tested and is in production use by many stores.

 

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

Is there a fix to the small flat rate international package? I can't get it working either, although everything else is working fine (2.2). I am within the USPS limits and I have it selected in admin. Anything else to try? Is it possible that the 'name' has changed?

 

Thanks.

Share this post


Link to post
Share on other sites

In includes/modules/shipping/usps.php find this line

 

// mail(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, $body);

 

and uncomment it. Now run a test order that should give you the rate you want. You'll get an email with the XML response from USPS. Save the body of that email as an XML file and open it in Firefox. You should be able to read all of the rates returned by USPS.

 

Regards

Jim

 

edit: Can't spell today.

Edited by kymation

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

Share this post


Link to post
Share on other sites

Okay,

 

First of all, Jim, thanks for your help.

 

I've been looking at this too long today. However:

I uncommented the line in includes/modules/usps.php.

I ran a test order.

I got the email and saved as an XML.

I opened it in Firefox.

 

At this point I don't have a clue - it looks like there is actually something wrong with some of the code (somewhere) but I don't have the energy to try and track it down tonight. In any event, I decided to just allow the International customers to select First Class or Priority Mail for now and if I can get this working, will update later. (BTW - I actually ran it 3 times with different combinations of shipping methods selected and this is what I got each time.....)

 

I'm attaching the xml file - ????

 

If anyone can make any sense out of it (I expect it's right in front of me -- but I just don't see it).

 

Thanks.

 

new3.xml

Share this post


Link to post
Share on other sites

Firefox is complaining because the file is incomplete. Copy the complete text from the email, or go into your Admin for this module and set Show International Regulations: to False and try another order.

 

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,

 

Sorry (I'm going to be sorry I tried this tonight because tomorrow I might actually see the problem) however, I must have missed something because I do not havve an option in admin for setting international regs to false. (I am running 2.2 if that makes a difference). I tried commenting out where it's grabbed in the usps.php file but THAT didn't work - So if you could use little words I might be able to get this done - I did see where it cut off but figured I'd made a mistake in editing the file for the International Envelope (I don't see it if I did and I've looked several times - also that's working now).

 

So - give me some options for either getting the whole xml file into an email (I did copy everything that was there - the reason I assumed a coding problem) or a way to get rid of the regs and perhaps I can bother you about something else tomorrow - I do appreciate your help (and patience).

 

Thanks.

Share this post


Link to post
Share on other sites

Show International Regulations: is the last selection in the module settings. If it's not showing, you have probably made an error in the Installation section of the module file. First, try uninstalling and reinstalling the module. If that doesn't work, you'll have to search your changes for errors. A comparison program (Meld, Winmerge) would be very helpful in spotting where the differences are.

 

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,

 

I reinstalled - it's not there - I'll take a look tomorrow with winmerge. Maybe I'll spot the problem and be able to fix both issues. Thanks for your help. Have a good night - I'll be back again but hopefully it'll be to let you know I got it fixed.

 

K.

Share this post


Link to post
Share on other sites

Hey guys, can any of you see what is wrong with this line

 

if ($value['set_function']) {

eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");

} else

I think I am missing a ( but I am not sure where to place it.

 

thanks

Share this post


Link to post
Share on other sites

Okay, I have a more pressing matter. Since installing the module, my tax module is not working for local orders. I had just received an order from my own state and the taxes should have been included in the invoice/order and it was not. I just confirmed in a test account that this is true for all locations in my state. I have tax module for North Carolina - USA installed. Anyone know why it would stop working?

Share this post


Link to post
Share on other sites

Is there an update to this module for the changes Jan 27 2013? I have been trying to fix so first mail INTERNATIONAL displays but I can't get it to work.

Edited by mysalon

Share this post


Link to post
Share on other sites

Is there an update to this module for the USPS changes Jan 27 2013? I have been trying to fix so first mail International displays but I can't get it to work. I tried changing First-Class MailRM International Parcel to First Class Mail International Package

Edited by mysalon

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

×