Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - USPS Methods


Recommended Posts

This is what I am experiencing with USPS Methods 4.1 Beta.

Everything appears fine. At checkout I choose First Class International Mail. Then at the confirm order page I am charged for Express Mail. No matter what option I choose at checkout, Express Mail shows up at confirmation.

When testing your store to see if this works be sure to continue the order process all the way to confirmation. Anyone else?

 

I believe if you follow the changes outlined by KaleiDesigns above within 4.1 you'll be up and running fine.

 

I'm still having my issue with First Class appearing randomly on two stores at $0.00 if anyone can provide help... it was happening with 2.x and 3.0 and is happening 4.1 install of the module.

Link to comment
Share on other sites

I'm not a programmer and do not know anything technical... And I need help.. :'(

 

International shipping used to work perfectly fine till USPS changed the rate this month.

But after the USPS rate increase, 'Priority Mail International Flat Rate Envelope' , 'Priority Mail International Flat Rate Box' , and 'First-Class Mail International' do not display...

 

When USPS changed the rate in the past, I modified the code as below (includes -> modules -> shipping -> usps.php) to fix the problem.

 

$this->intl_types = array(

//'Global Express' => 'Global Express Guaranteed',

'Priority Mail Int' => 'Priority Mail International',

'First-Class Mail Int' => 'First-Class Mail International',

'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope',

'Priority Mail Int Flat Rate Box' => 'Priority Mail International Flat Rate Box'

);

 

Someone can let me know how this can be fixed so that especially 'Priority Mail International Flat Rate Envelope' and 'Priority Mail International Flat Rate Box' will display?

 

I don't know the version of the program...

Thanks for the help!

Link to comment
Share on other sites

Two very small questions:

 

First, while the International side of things looks fine, the Domestic side is configured a little differently, and I would like them to look the same.

 

International example: Express Mail International (EMS) (6 Days)

Domestic example: Express Mail: (1-3 days)

 

There is an extra : in the domestic quote, and I cannot find where this is inserted. Any help here would be great.

 

 

Second issue: Is there a way to sort the domestic quotes like the international quotes are sorted? I would like the options to appear as Express, Priority, First Class. This is how the international options appear, but the domestic options are sorted alphabetically (Express, First Class, Priority). It looks odd.

 

I have v4.01 beta installed.

 

Thanks in advance!

Link to comment
Share on other sites

International Flat-Rate options were not working (at least for me). I changed this:

	  $this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed',
							'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
							'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
							'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
							'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat Rate Envelope',
							'PRIORITY MAIL INT' => 'Priority Mail International',
							'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat Rate Envelope',
							'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat Rate Box',
							'FIRST-CLASS MAIL INT' => 'First-Class Mail International');

 

to this:

	  $this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed',
							'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
							'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
							'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
							'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat-Rate Envelope',
							'PRIORITY MAIL INT' => 'Priority Mail International',
							'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat-Rate Envelope',
							'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat-Rate Box',
							'FIRST-CLASS MAIL INT' => 'First-Class Mail International');

 

The only change is from "Flat Rate" to "Flat-Rate". I made this change based on the email response to the rate quote.

 

-jared

Link to comment
Share on other sites

International Flat-Rate options were not working (at least for me). I changed this:

	  $this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed',
							'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
							'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
							'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
							'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat Rate Envelope',
							'PRIORITY MAIL INT' => 'Priority Mail International',
							'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat Rate Envelope',
							'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat Rate Box',
							'FIRST-CLASS MAIL INT' => 'First-Class Mail International');

 

to this:

	  $this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed',
							'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
							'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
							'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
							'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat-Rate Envelope',
							'PRIORITY MAIL INT' => 'Priority Mail International',
							'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat-Rate Envelope',
							'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat-Rate Box',
							'FIRST-CLASS MAIL INT' => 'First-Class Mail International');

 

The only change is from "Flat Rate" to "Flat-Rate". I made this change based on the email response to the rate quote.

 

-jared

 

I change from "Flat Rate" to "Flat-Rate" and it worked!!! Thank you very much!!!!

Link to comment
Share on other sites

So what about normal flat rate, i.e. not international? When I logon to USPS website and do an estimate it shows flat rate option (that is not international). How can I add this? I see there is another contrib for USPS flat rate, but I would rather combine it all in this one. On their site for domestic shipping its called Priority Mail® Flat Rate Box. Any ideas on how to add this is?

Link to comment
Share on other sites

Gotta do this quick-

First, do you have USPS methods 4.0/4.1 or 3.0?

Did you want Priority standard AND Priority flat rate box? OR just Priority flat rate box?

 

To get ONLY flat rate box using usps methods 4.0/4.1, open usps.php and find the domestic options. Should say something like //priority mail options or something like that. To use flat rate box, change the "container" value for Priority mail to FLAT RATE BOX.

 

If you wanted both, we havn't programmed it yet. But we're working on it.

Link to comment
Share on other sites

The latest 4.1 Beta appears to include the latest fix for International shipping, based on the USPS rate changes. However, it messes up the domestic even more than it is now on my store. Right now, 1st Class is too much, Parcel rate is higher than Priority.

 

After installation of 4.1, Express Mail and Priority Mail options were changed to "Flat Rate Envelope". 1st Class was cheaper than before, but Parcel is still higher than Priority - even with the unwanted change to "Flat Rate Envelope". This was checked repeatedly with a test account using an address within my own state. Consequently, I rolled the changes back to 2.9.6, which is what I was running before. I made the manual change in the usps.php file for "First Class Mail International Package" to allow International rates to work for the time being, but domestic is still messed up.

 

My store would be dead without this contrib, so it is greatly appreciated. However, it appears that the 4.1 Beta needs more work - as do other fixes mentioned in the general forum - to address the domestic issues with the new USPS changes.

Link to comment
Share on other sites

v4.1 Parcel Post works fine in my store. If your transmitted package weight is less than 1 pound, USPS adds a surcharge for unusual weight. If the machineable option is set to false, they add a surcharge. Check the mail optionsoptions in USPS.php and see if this is there:

//PARCEL POST OPTIONS
	if ($key == 'Parcel Post'){
		$this->size = 'REGULAR';     //OPTIONS: 'LARGE', 'REGULAR', 'OVERSIZE'
		$this->machinable = 'true';  //OPTIONS: 'true', 'false'
	}

Make sure you changed everything to lowercase, if not, change "Parcel Post" to "PARCEL POST".

I'm currently trying to fix all the problems, so I don't know if it was something I added after 4.1 or what.

Link to comment
Share on other sites

Nevermind the previous post.

 

v4.1.2 is complete!!

 

Fixed all of the things complained about in this thread including the priority flat rate + priority standard problem

New weight threshold for firstclass and parcelpost for real-time "container" changes inside USPS.php

 

Looking forward to hearing your feedback.

Edited by naps1saps
Link to comment
Share on other sites

Nevermind the previous post.

 

v4.1.2 is complete!!

 

Fixed all of the things complained about in this thread including the priority flat rate + priority standard problem

New weight threshold for firstclass and parcelpost for real-time "container" changes inside USPS.php

 

Looking forward to hearing your feedback.

 

Thanks Greg!

 

Scott

Link to comment
Share on other sites

Nevermind the previous post.

 

v4.1.2 is complete!!

 

Fixed all of the things complained about in this thread including the priority flat rate + priority standard problem

New weight threshold for firstclass and parcelpost for real-time "container" changes inside USPS.php

 

Looking forward to hearing your feedback.

 

my first class international is not working. No luck when playing with the dashes.

Link to comment
Share on other sites

Nevermind the previous post.

v4.1.2 is complete!!

Fixed all of the things complained about in this thread including the priority flat rate + priority standard problem

New weight threshold for firstclass and parcelpost for real-time "container" changes inside USPS.php

Looking forward to hearing your feedback.

 

All appears to be working perfectly, domestic and international.

 

THANKS!!

Link to comment
Share on other sites

All appears to be working perfectly, domestic and international.

 

THANKS!!

 

denistra,

 

just to be sure we are on the same page: I can see the first class rate INTL in my admin, but can't get quotes for it. However, USPS returns first-class quotes for domestic just fine.

 

First class INTL are quotes for parcels up to 4 pounds if I'm not mistaken?

 

Does it matter if I have a username, but no password from my account (I use the same in both fields)

 

Thanks!

site: www.thefrenchybee.com

Link to comment
Share on other sites

Thanks, I'll check that FirstClass int. tonight just to make sure. I thought I had everything tested, but then again....

 

Thanks, and yes, I confirm:

 

I got a set of new username and password, and still no first class for international

Link to comment
Share on other sites

Thanks, and yes, I confirm:

 

I got a set of new username and password, and still no first class for international

 

and you know what? First class international doesn't work on STAMPS.com either. So it's not just me :-)

Link to comment
Share on other sites

It must be your user address because it's working fine for me to Dublin Ireland.

 

BTW, I need to figure out how to not multiply packages for priority and express.

Also, I want to add those options for firstclass, etc. to the admin page and figure out how to sort the mail options from lowest cost to highest cost instead of fastest to slowest. I would also like to make a new column in the shipping options list for the delivery times.

Link to comment
Share on other sites

It must be your user address because it's working fine for me to Dublin Ireland.

 

BTW, I need to figure out how to not multiply packages for priority and express.

Also, I want to add those options for firstclass, etc. to the admin page and figure out how to sort the mail options from lowest cost to highest cost instead of fastest to slowest. I would also like to make a new column in the shipping options list for the delivery times.

 

Found it! on line 65 of the module, I had to change to "package".

 

I'm just wondering why all the options are not made available and are forced to choose if we send parcels, letters or envelopes?

Link to comment
Share on other sites

Because we are limited to the length of the sql entry for each mail option like we had with the international. It will throw an error if the statement is too long. That's why there are no Global express options. To get away with some change I added that weight threshold for firstclass domestic so it will switch over to large envelope, so you could have it switch from large envelope to package or whatever you need at a certain weight. Everyone's needs are not the same. That is another problem we face as module programmers.

Link to comment
Share on other sites

Because we are limited to the length of the sql entry for each mail option like we had with the international. It will throw an error if the statement is too long. That's why there are no Global express options. To get away with some change I added that weight threshold for firstclass domestic so it will switch over to large envelope, so you could have it switch from large envelope to package or whatever you need at a certain weight. Everyone's needs are not the same. That is another problem we face as module programmers.

 

can't we change the field types in the database to make this work?

 

By the way, STAMPS.com released its update today :-)

Link to comment
Share on other sites

I don't know. I'm still trying to learn how those parts work. I'm still pretty new to SQL and PHP and don't have very much time to sit down and figure it out, but I'm trying. It'll probably be a month or so unless I can get John to help me (he helped build OSCommerce).

 

But if you want to play around with it, by all means go ahead. That's what I like about open-source.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...