Jump to content

USPS International Shipping


Guest afterfx

Recommended Posts

Guest afterfx

OK, Ive got all my USPS USA mail stuff so its all perfect, meaning Parcel, Priority, and express. Now I need to get my International mail straight. When a international customer buys something from my shop they get 30 different options. I only wanna offer a few options like Large Flat Rate Priority, Airmail, etc.

Thanks

Josh

Link to comment
Share on other sites

  • 2 months later...

Guest fjcinzion

I have the same problem with USPS. US is set up just like I want it but International has way too many choices. I just want Letterpost Airmail & Global Priority Flat Rate Envelope. How can I change this? There are no options in the USPS module setup in admin for choosing what International shipping options I want to use. :whistle:

Link to comment
Share on other sites

This is the same issue I posted about a week or so ago here. I've been reading through the CubeCart code as well as the USPS API documentation, and it looks like this module was either written very poorly or just never finished. There are 3 components that look like they need to be worked on:

  1. Select country. It appears that the name of the country to ship to needs to come from a predefined list of strings, which implies that the country name on the customer address form should really be a drop-down list, not a freeform text field.
  2. Package type. There's no reason a customer should be able to choose envelope or media mail when you know the package will always be shipped in a larger box. This is a parameter in the USPS API that looks like it gets set in the shipping module, but there's no option in the admin console to pick it.
  3. International shipping methods. Unfortunately it doesn't look like the USPS API allows you to specify which shipping methods to use (global priority, global express, etc), so this would need to be added as a set of options in the admin console, and implemented by filtering the XML response that comes back from the API.
I am currently working on these 3 issues, and hopefully will have something available soon. I must say though, I am quite disappointed that such a great package would have such a major flaw in one of the most important modules - and surprised that nobody has addressed this problem in the past.
Link to comment
Share on other sites

I also have issues with USPS and shipping internationally. I had a customer place an order to Australia and it quoted them over $30 for USPS Golobal Priority Flat Rate, but it only cost me $9 when I took it to the post office. I'm surprised they even placed the order, but I would like to offer rates that are actually real, so I hope this gets worked out.

Link to comment
Share on other sites

I am currently working on these 3 issues, and hopefully will have something available soon.

It looks like the first 2 points weren't actually a problem, but I'm still not sure if the issue is that CubeCart doesn't send enough information, or if USPS' IntlRate API simply returns too much data. Either way, the unwanted shipping methods can be filtered out in calc.php. I'll post some code when I have something working...

Link to comment
Share on other sites

Okay, this is a pretty ghetto fix, but it gets the job done. Basically what I did was find the code in calc.php that builds the dropdown lists and added an 'if' statement that checks whether you are using international shipping, and if so, whether you are using the desired shipping type.

Open /modules/shipping/USPS/calc.php.

Find (line 227 in unmodded CubeCart 3.0.12):

if($sum>0){




and replace it with:


if(($sum>0) && (($api=="RateV2") || ($key=="Global Priority Mail - Variable Weight (Single)"))){

This will limit your international shipping options to "USPS Global Priority Mail - Variable Weight (Single)", but you can hardcode in whichever shipping method or methods you want to be allowed. In the future, it would be nice to have something in the admin console to filter the results, but for now this will have to do.

Link to comment
Share on other sites

  • 2 weeks later...

This will limit your international shipping options to "USPS Global Priority Mail - Variable Weight (Single)", but you can hardcode in whichever shipping method or methods you want to be allowed. In the future, it would be nice to have something in the admin console to filter the results, but for now this will have to do.

Link to comment
Share on other sites

  • 6 months later...
Guest JHouston

Okay, this is a pretty ghetto fix, but it gets the job done. Basically what I did was find the code in calc.php that builds the dropdown lists and added an 'if' statement that checks whether you are using international shipping, and if so, whether you are using the desired shipping type.

Open /modules/shipping/USPS/calc.php.

Find (line 227 in unmodded CubeCart 3.0.12):

if($sum>0){




and replace it with:


if(($sum>0) && (($api=="RateV2") || ($key=="Global Priority Mail - Variable Weight (Single)"))){

This will limit your international shipping options to "USPS Global Priority Mail - Variable Weight (Single)", but you can hardcode in whichever shipping method or methods you want to be allowed. In the future, it would be nice to have something in the admin console to filter the results, but for now this will have to do.

This worked great except for one thing. It is the only option showing up, but it is showing up 3 times,,why is it doing that?

Link to comment
Share on other sites

  • 2 weeks later...
Guest drknipple

Okay, this is a pretty ghetto fix, but it gets the job done. Basically what I did was find the code in calc.php that builds the dropdown lists and added an 'if' statement that checks whether you are using international shipping, and if so, whether you are using the desired shipping type.

Open /modules/shipping/USPS/calc.php.

Find (line 227 in unmodded CubeCart 3.0.12):

if($sum>0){




and replace it with:


if(($sum>0) && (($api=="RateV2") || ($key=="Global Priority Mail - Variable Weight (Single)"))){

This will limit your international shipping options to "USPS Global Priority Mail - Variable Weight (Single)", but you can hardcode in whichever shipping method or methods you want to be allowed. In the future, it would be nice to have something in the admin console to filter the results, but for now this will have to do.

This does work well. The only thing for me is that I don't understand how to add more than one option.

I only want to offer Airmail Parcel Post and Airmail Letter Post, but can't figure out how to add a second option. I'm feeling really dense. Can anyone help with what is surely a simple fix?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
Guest 850

Open /modules/shipping/USPS/calc.php.

Find (line 227 in unmodded CubeCart 3.0.12):

if($sum>0){




and replace it with:


if(($sum>0) && (($api=="RateV2") || ($key=="Global Priority Mail - Variable Weight (Single)"))){

This didn't work at all for me in 3.0.15. At checkout when choosing shipping, the only choice given is a single line blank drop down menu that doesn't have any options.

And before I even applied this mod, Global Priority Variable Rate wasn't even one of the many options available.

Link to comment
Share on other sites

Guest 850

Actually, I see now that it does work but only on some of my items. On an item I have that weighs 5lbs, I don't get any shipping options. Messing with the weight on this item, it looks like anything over 4lbs doesn't get a shipping option.

Link to comment
Share on other sites

  • 3 months later...
  • 11 months later...
Guest BaggBoy

I tried this code, and though it worked at cleaning up the USPS mail options for Int'l, when I tested domestic shipping I wasn't even offered USPS Priority Mail, instead only giving me the UPS Ground option which is the other shipping I offer. So, for int'l, yes, I have USPS, but for domestic, I don't. Any suggestions why?

Thanks.

Okay, this is a pretty ghetto fix, but it gets the job done. Basically what I did was find the code in calc.php that builds the dropdown lists and added an 'if' statement that checks whether you are using international shipping, and if so, whether you are using the desired shipping type.

Open /modules/shipping/USPS/calc.php.

Find (line 227 in unmodded CubeCart 3.0.12):

if($sum>0){




and replace it with:


if(($sum>0) && (($api=="RateV2") || ($key=="Global Priority Mail - Variable Weight (Single)"))){

This will limit your international shipping options to "USPS Global Priority Mail - Variable Weight (Single)", but you can hardcode in whichever shipping method or methods you want to be allowed. In the future, it would be nice to have something in the admin console to filter the results, but for now this will have to do.

Link to comment
Share on other sites

  • 1 month later...
Guest niacin

I had a similar issue and the above fix did the trick. Basically I only wanted 1 choice in the shipping drop down for International Orders.

I had to do this:

if(($sum>0) && (($api=="RateV3") || ($key=="Priority Mail International Flat-Rate Envelope"))){

Seamed to do the trick. Wish there was a mod for this. A option in the admin panel to modify what customers get as far as shipping options go based on their locale.

-------------------------------------

cubecart v3 @ http://lifesoak.com

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

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

Guest
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...