Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MVS and USPS


trannyman

Recommended Posts

What does it take to get the USPS shipping module to work with Multi-Vendor Shipping?

 

I had it working great until the latest capitolization deal forces all orders into the 'Express' option. No matter which shipping choice the user makes, he/she is given the most expensive one (Express). This forced me to do the 2.9 USPS update which doesn't include instructions for MVS.

 

No matter what I try, I cannot get it to work properly. Either I get forced into the Express option, or I get an Error for the USPS calculations.

 

Can anyone instruct me as to which series of installations I should go through to get this working properly? I don't know if I have to installl every single update, or if you can skip straight to the 2.9.2 USPS update. I believe I started with the 2.5 and jumped up to the 2.8d version that the MVS pakage came with. Should I have installed other versions in between that jump? That actually seems to work fine. It's the latest 2.92 that I can't get to work.

 

I really need to get the Multi-Vendor shipping option working. Any help would be appreciated.

 

Tod C.

Modesto, Ca.

Link to comment
Share on other sites

I got my problem fixed thanks to "iofast". Here is what fixed the usps shipping errors for me after the capitolization upgrade.

 

 

I don't know who has noticed yet but USPS has decided to mess with thousands of vendors all across the world by changing their descriptions in the code they send to caps. Seems like a small change and I bet the new programmer their didn't realize what he did but he broke most oscommerce stores using usps.php either in mvs or the standard oscommerce. This change likely broke MANY other carts too and they will probably change it back when they realize what chaos they have caused with such a silly change.

 

In any case, for mvs, this is how you fix the problem:

/includes/modules/vendors_shipping/usps.php

 

change all cases of Express where is named ALONE, ie not Global Express Mail, to EXPRESS

change all cases of Priority where is named ALONE, ie not International Priority Mail, to PRIORITY

change all cases of First Class where is named ALONE, ie not First Class Mail International , to FIRST CLASS

change all cases of Parcel where is named ALONE, ie not International Parcel Post, to PARCEL

 

I can't list the exact locations for you because my usps.php file is changed, here is an example of a changed location

 

OLD:

	  $this->types = array('Express' => 'Express Mail',
					   'First Class' => 'First-Class Mail',
					   'Priority' => 'Priority Mail',
					   'Parcel' => 'Parcel Post');

 

NEW:

	  $this->types = array('EXPRESS' => 'Express Mail',
					   'FIRST CLASS' => 'First-Class Mail',
					   'PRIORITY' => 'Priority Mail',
					   'PARCEL' => 'Parcel Post');

 

After you make this change you STILL need to go in the DB and make some changes.

 

The first thing you need to do is unselect all but one of the USPS shipping options in the admin panel under USPS located under the Manage section for each vendor. We unselected all but Parcel as an example for each vendor. We then went into the table 'vendor_configuration' and edited all rows that match 'Domestic Shipping Methods' in the field 'configuration_title' and also shows USPS somewhere in the field of configuration_key. Once you have those rows ready to be edited in phpMyAdmin or your editor of choice upper case the values for the 'configuration_value' that you deselected. For example we changed our 'configuration_value' to

 

EXPRESS, PRIORITY, FIRST CLASS, Parcel

 

and make the same change to 'set_function' such as:

 

tep_cfg_select_multioption(array('EXPRESS', 'PRIORITY', 'FIRST CLASS', 'Parcel'),

 

Once these changes are made go back and enable the methods you just disabled and disable the method you left on. Now go back to your DB editor and change the final lower case term (Parcel in our example above) to upper case as we had done to the first the classes listed above.

 

 

What does it take to get the USPS shipping module to work with Multi-Vendor Shipping?

 

I had it working great until the latest capitolization deal forces all orders into the 'Express' option. No matter which shipping choice the user makes, he/she is given the most expensive one (Express). This forced me to do the 2.9 USPS update which doesn't include instructions for MVS.

 

No matter what I try, I cannot get it to work properly. Either I get forced into the Express option, or I get an Error for the USPS calculations.

 

Can anyone instruct me as to which series of installations I should go through to get this working properly? I don't know if I have to installl every single update, or if you can skip straight to the 2.9.2 USPS update. I believe I started with the 2.5 and jumped up to the 2.8d version that the MVS pakage came with. Should I have installed other versions in between that jump? That actually seems to work fine. It's the latest 2.92 that I can't get to work.

 

I really need to get the Multi-Vendor shipping option working. Any help would be appreciated.

 

Tod C.

Modesto, Ca.

Link to comment
Share on other sites

  • 2 months later...
I got my problem fixed thanks to "iofast". Here is what fixed the usps shipping errors for me after the capitolization upgrade.

I don't know who has noticed yet but USPS has decided to mess with thousands of vendors all across the world by changing their descriptions in the code they send to caps. Seems like a small change and I bet the new programmer their didn't realize what he did but he broke most oscommerce stores using usps.php either in mvs or the standard oscommerce. This change likely broke MANY other carts too and they will probably change it back when they realize what chaos they have caused with such a silly change.

 

In any case, for mvs, this is how you fix the problem:

/includes/modules/vendors_shipping/usps.php

 

change all cases of Express where is named ALONE, ie not Global Express Mail, to EXPRESS

change all cases of Priority where is named ALONE, ie not International Priority Mail, to PRIORITY

change all cases of First Class where is named ALONE, ie not First Class Mail International , to FIRST CLASS

change all cases of Parcel where is named ALONE, ie not International Parcel Post, to PARCEL

 

I can't list the exact locations for you because my usps.php file is changed, here is an example of a changed location

 

OLD:

	  $this->types = array('Express' => 'Express Mail',
					   'First Class' => 'First-Class Mail',
					   'Priority' => 'Priority Mail',
					   'Parcel' => 'Parcel Post');

 

NEW:

	  $this->types = array('EXPRESS' => 'Express Mail',
					   'FIRST CLASS' => 'First-Class Mail',
					   'PRIORITY' => 'Priority Mail',
					   'PARCEL' => 'Parcel Post');

 

After you make this change you STILL need to go in the DB and make some changes.

 

The first thing you need to do is unselect all but one of the USPS shipping options in the admin panel under USPS located under the Manage section for each vendor. We unselected all but Parcel as an example for each vendor. We then went into the table 'vendor_configuration' and edited all rows that match 'Domestic Shipping Methods' in the field 'configuration_title' and also shows USPS somewhere in the field of configuration_key. Once you have those rows ready to be edited in phpMyAdmin or your editor of choice upper case the values for the 'configuration_value' that you deselected. For example we changed our 'configuration_value' to

 

EXPRESS, PRIORITY, FIRST CLASS, Parcel

 

and make the same change to 'set_function' such as:

 

tep_cfg_select_multioption(array('EXPRESS', 'PRIORITY', 'FIRST CLASS', 'Parcel'),

 

Once these changes are made go back and enable the methods you just disabled and disable the method you left on. Now go back to your DB editor and change the final lower case term (Parcel in our example above) to upper case as we had done to the first the classes listed above.

 

 

I just ran across this post - thank God!!!

 

I was having the same problem, except my shipping was forcing the cheapest method. I fixed the caps and all is working fine now!

 

THANK YOU!! :lol:

The tomb could not hold God's Son...but your heart can

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