Jump to content

usps rate increase = shipping module changes?


Guest conspicuouschick

Recommended Posts

Guest ladagerick

I ship world wide and have shut down our store since monday, if there is not a fix by monday is there an simple way to only ship to USA and not allow other countries (or do I delete them one by one?)? Obviously we cannot afford to ship international without shipping charges but I need to get store up for USA customers.

Were are a Non-Profit Ministry so I have a little leeway. :)

Ladagerick, has you USPS modules ever been modified from the original ones that come with CC3.0.15?

I'm just wondering why so many people are having problems where my store is running fine shipping domestic/international. I would like to try to help anyone if possible.

I am using 3.0.15 and may have changed a line or two. how can I get a non changed usps module to try?

Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Guest midwest

I don't charge for shipping with in the USA except for Express Mail, but I did do some mock orders after re sending the Test to the USPS live servers. I even went and created a new account with the web tools.

Before I placed the mock orders, I enabled the First Class, Priority and Express, with Regular Package size choosen. I also did a check through the Shipping Calculator on the USPS site to check the Rates against what CC Check Out was telling me.

For a Domestic Address all Shipping options came up fine with correct amounts.

Mock International did not come up at all.

This is where the problem lies as they have changed product names/ apis and this is going to have to be reflected in the Code in CC as the api is a different Version ( now V3).

The version change does not affect Domestic. UNLESS you are shipping packages over 84" L+G or over 1 cubic Ft.

I have a mod in my Shipping files, which I have eluded to in previous posts in this topic.

This mod basically introduces a new field in the Admin for Variable rate.

This allows for different weight packages.

It also makes a change in the International shipping, which I am looking into. Al also has this info.

It should be known that there are a number of other changes that will probably need to be made with in the code to reflect some of the changes the USPS has made. Some are optional, and can be added later, some are not.

I may be doing some test's with some changes in the code this week or this wekend to see if I cannot come up with a "fix" until the CC developers can get a module created.

midwest :)

I ship world wide and have shut down our store since monday, if there is not a fix by monday is there an simple way to only ship to USA and not allow other countries (or do I delete them one by one?)? Obviously we cannot afford to ship international without shipping charges but I need to get store up for USA customers.

Were are a Non-Profit Ministry so I have a little leeway. :(

Ladagerick, has you USPS modules ever been modified from the original ones that come with CC3.0.15?

I'm just wondering why so many people are having problems where my store is running fine shipping domestic/international. I would like to try to help anyone if possible.

Tim,

Is this to say all your shipping options are showing up with in checkout and that you have no mods at all with in any of your shipping files?

midwest :w00t:

Link to comment
Share on other sites

Guest steveboy

Steveboy, are you using the normal /class.usps.php file or is it modified?

I cant' recall changing this doc. To be honest it's all a blur -- I don't know a thing about PHP, and my install and mods are a weeklong sleepless blur.

Link to comment
Share on other sites

Guest steveboy

How are you shipping to US only? I can't find the option anywhere to disable country selection. There are countries listed in the "by weight" menu, but even if I disable that, the country options show up. Do I disable AND remove all the country codes by zone?

This is absolutely ridiculous. Are there tens of thousands of online retailers in this predicament? Why am I not hearing about it?

Link to comment
Share on other sites

Guest steveboy

Steveboy, are you using the normal /class.usps.php file or is it modified?

I can't find a doc in my hard drive or host directories called class.usps.php. Everything seems to be in /public_html/cubecart/admin/modules/shipping/, with a /USPS subdirectory along with others (including one called /By_Weight.

Link to comment
Share on other sites

Guest midwest

Steveboy, are you using the normal /class.usps.php file or is it modified?

I can't find a doc in my hard drive or host directories called class.usps.php. Everything seems to be in /public_html/cubecart/admin/modules/shipping/, with a /USPS subdirectory along with others (including one called /By_Weight.

Steveboy, I don't think the class.usps.php is in that directory.

try:

public_html/cubecart/modules/shipping/USPS

Leave the countrys alone for now.

Those are all in one of the USPS shipping module files anyway.

That is why when you disable it by weight they still show up for USPS.

BY WEIGHT is a different module.

I am actually shipping International, just not through my CC store. I have redirected folks to my eBay store for International orders.

This is how an additional marketplace comes in handy. If one breaks, you can always redirect them to the other :w00t:

midwest :)

Link to comment
Share on other sites

Guest midwest

Just to let everyone know, I found out today that the Max size Package for First Class International is

36" , Length+Width+Hieght (Thickness)

midwest :)

Link to comment
Share on other sites

Guest FelipeT

I just wanted to add to the conversation:

I am trying to set up a new store, and have everything (v3.0.15) working so far with the exception of the USPS module.

I currently get an authorization error when submitting a test in an effort to enable the module. I have spoken wit USPS, and everything on their side (my registration, etc) is fine. They have even moved my ID over to production servers, but I am still failing to enable this mod.

I would love some guidance here so I can get this store running

Link to comment
Share on other sites

Guest midwest

JUST A HEADS UP-

Everyone run a test on your USPS International Shipping options, if applicable.

Mine are screwed up since the USPS Change. Not coming up in the Dropdown.

Will run a re-test to the USPS servers today through Admin Shipping module to see if that does the trick.

midwest :P

Do you have any mods done to your USPS?

If you just have the regular 'class.usps.php' file from CC3.0.15, then all the new international shipping methods should be listed.

I have a modified USPS file, which limits the International to specific shipping methods only. This morning my International shipping was now coming up with empty results. I have to change to names hardcoded in my file over to the new internation names. Now everyhting seems okay.

-Tim

Tim,

Could you PLEASE POST your changes to your file so we all can tell what you did where ?

I think this would be of GREAT help to all.

Thanks

midwest ;)

Link to comment
Share on other sites

Guest midwest

Ok Folks,

I think found an answer to at least some of those out there having problems with the new USPS shipping.

I FINALLY have got mine working.

Notes:

I use CC V3.0.15, killer skin.

I did not change any references to the Version( ie RateV2, V3) with in the files.

Also, I tried changing the http://production.shippingapis.com to https://secure.shippingapis.com that was eluded in a previouse post. This had no effect.

Keep the http://Production.ShippingAPIs.com/ShippingAPI.dll as it is in the file.

This did not change the "Authorization Error connecting to United States Postal Service Server " error. I am still receiving this error when I submit a test. However the rates ARE SHOWING in the cart.

What some will need to do, if you have applied the following mods, you will need to remove them from the file and resave.

Basicly, we are reverting back to the stock files.

files affected by these mods:

/admin/modules/shipping/USPS/index.php

/modules/shipping/USPS/class.usps.php

/modules/shipping/USPS/calc.php.

I STRONGLY SUGGEST MAKING B.U. Copies of the files you currently have and save them to your PC BEFORE applying any changes.

Also, I suggest turning off your store while you are making the file changes.

Mods can be found HERE POST #1

If you have applied any of these mods, remove them and resave the file(s).

These were the only shipping mods I had, so if you have others through the USPS shipping module files, I would suggest removing those mods as well. Just refer back to where you got them from and remove whatever changes you made.

Now go do some test orders through your store.

This seemed to take care of the problem for me.

Now all that is left to be done is to reintroduce the "Variable" weight reference, and code in only the services I wanted offered for International and it should be finished.

I have not done this part yet, but I will post here once I find out how it goes.

midwest :P

Link to comment
Share on other sites

In my modules\shipping\USPS\calc.php file:

			// only proceed if module is enabled

			if($module["service_".$moduleKey]==1){



				switch($moduleKey) {

				

					case "Express":

						$package = array(

							'zip_origin' => $module['zip_origin'],

							'zip_dest' => $zip_dest,

							'pounds' => $lbs,

							'ounces' => $oz,

							'service' => 'EXPRESS',

							'size' => $module['expressSize'],

//							'container' => $module['expressContainer'],

							'country' => $countryName,

							'mail_type' => "Package"

						);

						$overWeight = overWeight(70);

					break;

					

					case "FirstClass":

						$package = array(

							'zip_origin' => $module['zip_origin'],

							'zip_dest' => $zip_dest,

							'pounds' => $lbs,

							'ounces' => $oz,

							'service' => 'FIRST CLASS',

							'size' => $module['FirstClassSize'],

							'country' => $countryName,

							'mail_type' => "Package"

						);

						$overWeight = overWeight(0.812);

					break;

					

					case "Priority":

						$package = array(

							'zip_origin' => $module['zip_origin'],

							'zip_dest' => $zip_dest,

							'pounds' => $lbs,

							'ounces' => $oz,

							'service' => 'PRIORITY',

							'size' => $module['prioritySize'],

//							'container' => $module['priorityContainer'],

							'country' => $countryName,

							'mail_type' => "Package"

						);

						$overWeight = overWeight(70);

					break;




For the express and priority cases, I have both container lines commented out (//).





And in the my modules\shipping\USPS\class.usps.php file:


			//Check container for Express and Priority

//			if(strtolower($attribs['service']) == 'express' || strtolower($attribs['service']) == 'priority')

//			{

//				if(!isset($attribs['container'])) {  $this->debug("USPS ERROR: Container for express or priority post was not set."); return false; }

//				else {

//					switch(strtolower($attribs['container']))

//					{

//						case 'flat rate envelope':

//						case 'flat rate box':

//						case 'Non-Flat Rate' :

//							break;

//						default:

//							$this->debug("USPS ERROR: Container not recognised.");

//							return false;

//					}

//				}

//			}



			//Check size


You can see that large 'Check container section is all commented out (//).





Also, here is a hard coded change I did which will only list the International shipping options I want to use:

(This is also in the class.usps.php file and not needed but it will get rid of all those flat rates and other odd methods)

Find the line of code from:


else if(isset($xml['IntlRateResponse']))


all the way down to:


function get_rates($package_id = 0)




and change all that code in between to 




		else if(isset($xml['IntlRateResponse']))

		{

			//This is international data, so parse it accordingly

			

			$intshipping = array ( "Express Mail International (EMS)", "Priority Mail International", "First-Class Mail International" );





			$package_id = 0;



			if(isset($xml['IntlRateResponse']['#']['Package']['0']['#']['Error']))

			{

				$x_errorDesc = $xml['IntlRateResponse']['#']['Package']['#']['Error'];

				$this->current_result[$package_id]['Error']['Description'] = $x_errorDesc;

			}

			else if(isset($xml['IntlRateResponse']))

			{

				$x_postage = $xml['IntlRateResponse']['#']['Package']['0']['#']['Service'];



				for($i=0; $i < count($x_postage); $i++)

				{

					$x_mailservice = $x_postage[$i]['#']['SvcDescription']['0']['#'];

					$x_rate = $x_postage[$i]['#']['Postage']['0']['#'];

					$service = $x_postage[$i]['#']['SvcDescription']['0']['#'];

					

					if ( $service == $intshipping[0] or $service == $intshipping[1] or $service == $intshipping[2] )

						{ 

							$this->current_result[$package_id]['Postage'][$x_mailservice] = $x_rate;

						}

						

#					echo "MailService = ".$x_mailservice."<br>";

#					echo "Rate = ".$x_rate."<br>";

					

//					$this->current_result[$package_id]['Postage'][$x_mailservice] = $x_rate;

				} 

			}

		}



		return true;

	}



	function get_rates($package_id = 0)

This will only now display the three shipping methods listed in intshipping array.

Of course if you are going to change ANYTHING in your existing files, make a back up copy of the original first before you make any changes! This way if something isnt working right you can just go right back to your original code!!!

Link to comment
Share on other sites

Guest steveboy

So is there likely to be some solution available to people who don't earn their living as IT Admins? Because I barely understand any of this.

Link to comment
Share on other sites

Guest midwest

Tim,

Thanks for the post . Very Helpful !

Got some questions though,

Why did you comment out the containers ?

Also, would not the International shipping mod that hafree has done in regard to the select International services work?

Right now, ALL the International services are showing up in my cart.

Also, do you have the "Variable Rate " mod in admin?

I would like to reimplement as I don't do any FLAT RATE shipping.

steveboy-

I don't know about Tim, but I am NO IT admin :)

midwest :P

So is there likely to be some solution available to people who don't earn their living as IT Admins? Because I barely understand any of this.

Steveboy-

Did you modify any of your USPS shipping files?

midwest ;)

Link to comment
Share on other sites

Guest ladagerick

Okay I am back from a three day weekend! Has there been some progress on usps international? Or do I need to find what software is working and swich to that?

Link to comment
Share on other sites

Guest steveboy

I honestly can't remember if I modified the USPS shipping files. Installing, configuring, and modding Cubecart was my introduction to PHP, and between the configurations necessary to make the thing work, the changes necessary to install mods, and all the tweaking afterward, it's a huge blur to me. All I know is that it worked fine before the rate change, and it doesn't work at all now.

I'm not using the latest version of Cubecart entirely because of the ridiculous amount of work it takes to update & recustomize the app and reinstall the mods. If this is something that has to be done every time the USPS makes a change, it's certainly not practical to keep using Cubecart and I'll have to find another solution.

Link to comment
Share on other sites

Guest midwest

ladagerick-

Hope you enjoyed your time off !! I sure need some !!

Anyway, to update:

1.) Mine is now working after uninstalling the mods I had. Basically just went back to the stock CC USPS shipping files. This did NOT fix the error message in Admin though. However, that did not seem to affect the rate calculations. They still came up in my cart. Read my previous post for more info.

Also, if you have multiple class selections in the USPS module enabled, you will get multiple International rate quotes. This has been a problem though even before the rate change. There is a mod for this however.

2.) I have heard nothing from Al. Don't know what his progress is.

I will be reinstalling my mods and will let everyone know how it goes.

steveboy-

I understand your frustration. I had to scrap and start from scratch 3 times & about 2 months time before I got things working correctly.

In business it's time vs money. There are other solutions out there that will take care of as much as you want them to, giving you more time, but it cost. Even with it's short comings, CC is one of the best Free use carts I've seen, and I've tried several. BUT it requires more time on your part. You just have to weigh the two and decide for yourself.

Like I said, the rates ARE coming through if you have unmodded files. One thing for you I might suggest is to use the search feature using your username and see if you can pull up the mods through the post. That might help you get things straightened out.

You might also go over to CC.org and contact some modders there. Their rates are VERY Reasonable and they have been working with CC for a long time.

Lastly-

Beside the fact that the USPS should just leave well enough alone, as well as be more helpful, CC developers need to be more vigilant in these issues. This is a problem that SHOULD have been addressed MONTHS ago with a fix/suggestions posted and help available for those who needed it. Perhaps they were not notified by USPS. I know I was not.

CC Customer support is an area that needs to be re-analyzed. Esspecially if they have as many users as I believe they do. They need to have a Phone support system, At LEAST for the Paid Licensees. And better Forum Monitoring. Just my opinion. And not really applicble to this topic, but had to get it off my chest. sorry.

midwest :D

Link to comment
Share on other sites

Guest steveboy

I downloaded the files

/admin/modules/shipping/USPS/index.php

/modules/shipping/USPS/class.usps.php

/modules/shipping/USPS/calc.php

and replaced with the originals. I got current rates but a ridiculous amount of options. I tried Tim Hensel's mods and lost all shipping completely. I tried to revert back to the originals with the intention of commenting out the modules I didn't want -- and can't get even the ridiculous options back! All I can think is that somehow I overwrote the originals, even though I tried to be careful not to. Is there any way to get hold of clean copies of the above files? I'm using 3.0.12; I hope that .15 source files will still work here.

Arrgh. It was so close.

Link to comment
Share on other sites

Guest midwest

I downloaded the files

/admin/modules/shipping/USPS/index.php

/modules/shipping/USPS/class.usps.php

/modules/shipping/USPS/calc.php

and replaced with the originals. I got current rates but a ridiculous amount of options. I tried Tim Hensel's mods and lost all shipping completely. I tried to revert back to the originals with the intention of commenting out the modules I didn't want -- and can't get even the ridiculous options back! All I can think is that somehow I overwrote the originals, even though I tried to be careful not to. Is there any way to get hold of clean copies of the above files? I'm using 3.0.12; I hope that .15 source files will still work here.

Arrgh. It was so close.

Can't you go back and download where you got them from before?

Once you get them again, MAKE COPIES FIRST Save them to your PC. Them you will always have them if you need them.

You will come up with ALOT of options. and the more services you have enabled, Express, Priority, First Class, in your Admin USPS Module , they will multiply by that amount. In other words, if you have 2 sevices enabled, it will duplicate the International quotes.

I am going to install the mod I mentioned to rectify that. IF it works, I'll let you know.

midwest :D

Link to comment
Share on other sites

Guest steveboy

Ooh, I found the USPS.zip file. I'm not as dumb as I look! Then again, I probably couldn't be. :D

YES! replacing

/modules/shipping/USPS/class.usps.php

/modules/shipping/USPS/calc.php

with the original files gives shipping options and current rates. Now I need to figure out how to provide just the shipping options I want to (Priority and Firts Class). This is progress, anyhow!

Link to comment
Share on other sites

Guest ladagerick

Is there a way to restrict my store to USA shipping only (Besides eliminating each country except the US one by one that would take a while to do and reverse) and International will not be processed? That would buy me some time to try to figure out the problem with international usps

Will try what steveboy is doing by upgrading to 3.0.16

Link to comment
Share on other sites

Guest midwest

Ooh, I found the USPS.zip file. I'm not as dumb as I look! Then again, I probably couldn't be. :D

YES! replacing

/modules/shipping/USPS/class.usps.php

/modules/shipping/USPS/calc.php

with the original files gives shipping options and current rates. Now I need to figure out how to provide just the shipping options I want to (Priority and Firts Class). This is progress, anyhow!

Way to Go !

Where did you find the .zip file anyway ?

Going offline for now be back later.

midwest :D

Link to comment
Share on other sites

Guest steveboy

Way to Go !

Where did you find the .zip file anyway ?

Going offline for now be back later.

midwest :D

I had saved it in my cubecart directory on my hard drive; I just hadn't remembered that the USPS module had been a separate install.

Now I'm trying to figure out how to remove mailing options I don't want. I know I did this on the original install but can't figure out how. Would this be a cubecart.org issue?

Link to comment
Share on other sites

Guest steveboy

Hallelujah! Started from scratch with the original files Midwest listed. Used Tim's mods. Got the results I wanted. test purchases worked fine. USPS test results in the shipping module still report failure, but what do I care if people can buy stuff and get charged correct shipping?

Fingers crossed for this to be the last solution, but it works for me, and hopefully will work for others as well!

Thank you for your help & patience!

Link to comment
Share on other sites

Guest midwest

Hallelujah! Started from scratch with the original files Midwest listed. Used Tim's mods. Got the results I wanted. test purchases worked fine. USPS test results in the shipping module still report failure, but what do I care if people can buy stuff and get charged correct shipping?

Fingers crossed for this to be the last solution, but it works for me, and hopefully will work for others as well!

Thank you for your help & patience!

Wat to go AGAIN steveboy-

See, you are an IT admin :D

midwest :D

Link to comment
Share on other sites

Guest midwest

Re-installed hafree's Variable container option for Express and Priority for USPS Module CC Admin. Works great.

midwest :D

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