Jump to content
Latest News: (loading..)
fulluvscents

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

Recommended Posts

OK. I feel like I am close to installing this. Inside my Admin I am getting this error.

 

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/content/36/7821036/html/warehouse/catalog/admin/modules.php(235) : eval()'d code on line 1

 

I started with a fresh install.

Share this post


Link to post
Share on other sites

Jetta did I thank you for a fine job??

 

yeah, what she said!! :thumbsup:

 

Jetta, I installed Restrict USPS Shipping Methods and it's running well so far after trying it with a couple products.

 

Question on the position where that is located. In my install, the tool is at the top and off to the right of the product edit form.

 

When I tried my first product edit I was looking vertically up and down the form until it caught my eye up there

 

Visually it appears displaced almost like its off the form.

 

But perhaps that's how it's supposed to be? No biggie, just wondering


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

Help with your Fix!!! I install 2.3.1 about 6 weeks ago and was having issues with international rates. I saw your post and since its a new install I copied the files and ran the script provided. Now I get the following error. Any Ideas on how to correct. Or script to modify configuration_description. I tried manualy through the SQL Manager UI but looks like it does not work...

 

Thanks

 

1406 - Data too long for column 'configuration_description' at row 1

 

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Methods (Domestic and International)', 'MODULE_SHIPPING_USPS_TYPES', '0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00', 'Checkbox: Select the services to be offered

Minimum Weight (lbs)first input field

Maximum Weight (lbs):second input field

 

USPS returns methods based on cart weights. These settings will allow further control (particularly helpful for flat rate methods) but will not override USPS limits', '6', '0', 'tep_cfg_usps_services(array(\'First-Class MailRM Large Envelope\', \'First-Class MailRM Parcel\', \'Media MailRM\', \'Parcel PostRM\', \'Priority MailRM\', \'Priority MailRM Flat Rate Envelope\', \'Priority MailRM Legal Flat Rate Envelope\', \'Priority MailRM Padded Flat Rate Envelope\', \'Priority MailRM Small Flat Rate Box\', \'Priority MailRM Medium Flat Rate Box\', \'Priority MailRM Large Flat Rate Box\', \'Priority MailRM Regional Rate Box A\', \'Priority MailRM Regional Rate Box B\', \'Priority MailRM Regional Rate Box C\', \'Express MailRM\', \'Express MailRM Flat Rate Envelope\', \'Express MailRM Legal Flat Rate Envelope\', \'Express MailRM Flat Rate Boxes\', \'First-Class MailRM International Large Envelope**\', \'First-Class MailRM International Parcel**\', \'Priority MailRM International\', \'Priority MailRM International Flat Rate Envelope**\', \'Priority MailRM International Small Flat Rate Box\', \'Priority MailRM International Medium Flat Rate Box\', \'Priority MailRM International Large Flat Rate Box\', \'Express MailRM International\', \'Express MailRM International Flat Rate Envelope\', \'Express MailRM International Flat Rate Boxes\', \'USPS GXGTM Envelopes**\', \'Global Express GuaranteedRM (GXG)**\'), ', now())

 

[TEP STOP]

Share this post


Link to post
Share on other sites

@@jeffreyice1

 

Go through your phpmyadmin, find the configuration table, and set the datatype for "configuration_value" and "set_function" both to text (which will give you practically unlimited characters in those fields. That query should have been run with your install and shouldn't need to be done manually, but what worked on my server might not have worked on yours. So, it's worth a check and a shot.

 

@@altoid

 

That's cause I'm just weird. There's SO SO SO Much space over there, and I don't like scrolling down a page, so that's where I put it. You should be able to move it for your personal preference without breaking anything. All I did was create two divs (one on the left, and one on the right), and I put it in the right div, leaving room below it for other add ons, etc... You can just remove the divs and put the add on below or in the midst of the page, wherever you want, so long as you keep the meat of it in one piece.

Share this post


Link to post
Share on other sites

You should be able to move it for your personal preference without breaking anything. All I did was create two divs (one on the left, and one on the right), and I put it in the right div, leaving room below it for other add ons, etc... You can just remove the divs and put the add on below or in the midst of the page, wherever you want, so long as you keep the meat of it in one piece.

 

I think It's starting to grow on me as it is.... :)


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

Jetta or anyone that can help

I have osc 2.3.1 installed and i wanted to ship by USPS so i thought I would give your contribution of USPS Rate V4 Intl Rate V2 - v.1.7_1 a try. I have installed it 5 times and still have not got it working. it goes from checkout to delivery information screen then displays the message (This is currently the only shipping method available to use on this order) with no options or information about the option that is selected and will not continue from that point no matter how many times you hit continue. Ive set my time zone with the (ini_set('date.timezone', 'America/YOURNEARESTCITY');) option and the( date_default_timezone_set('America/YOURNEARESTCITY');) option both so i have to assume that is correct. I have not installed any other USPS contributions before trying this one, and I used the drag and drop files after checking for comparision mismatches of which there were none , which allowed me to drag and drop the code.

 

I dont have the Dynamic template system installed so that is not the issue either. As far as im concerned it should run just fine ,its got me at odds end getting it running. I got the user id and the server is in production mode, and i recieved the return email stating its available. The only thing im not sure of is the Jquery stuff. I dont see any radio buttons or which option for shipping is available. It just sits there starring at me. HELP!

Share this post


Link to post
Share on other sites

The jquery doesn't affect the radio buttons. It only adds displays and checkboxes for extra services (like insurance, delivery confirmation, etc.).

 

In the usps.php file, there is a line that is commented out (something like) mail(STORE_OWNER, STORE_EMAIL_ADDRESS.....

 

Uncomment that line and see what the response is. It's possible that USPS isn't returning any rates and the email response will give you a hint as to why.

Share this post


Link to post
Share on other sites

Jetta,

 

I uncommented the line 294 in the USPS module and got an empty email with no sender and no body information.....completey empty! what the does that mean? Its as though it never connected to the USPS api service.

Edited by terryduncilsr

Share this post


Link to post
Share on other sites

jetta,

 

Heres the code in the USPS mod concerning emailing the server response.

 

$body = '';

$http = new httpClient();

if ($http->Connect('production.shippingapis.com', 80))

{

$http->addHeader('Host', 'production.shippingapis.com');

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

if ($http->Get('/shippingapi.dll?' . $request)) $body = preg_replace(array('/\<sup\>\&reg;\<\/sup\>/', '/\<sup\>\&trade;\<\/sup\>/', '/\" /', '/\",/', '/\"<br>/', '/<br>/'), array('RM', 'TM', '",', '" ', '"<br>', 'BREAK'), htmlspecialchars_decode($http->getBody()));

mail(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, $body);

$http->Disconnect();

return json_decode(json_encode(simplexml_load_string($body)),TRUE);

}

else return false;

}

 

That should have sent the response from the server if it was connecting correctly in my opinion. Is there another mod i should have installed before installing USPS Rate V4 Intl Rate V2 - v.1.7_1 ? What would you suggest from here?

Share this post


Link to post
Share on other sites

Hello,

I am using USPS Rate V4 Intl Rate V2 - v.1.4

Is it possible to use the module for orders that are over 70Lbs? Say a customer orders 100 Lbs of material, can I set it to split the shipment into a 70 lb and 30 lb package? Right now it just charges the 70 lb rate no matter what the total package weight is.

Thanks!

 

John

Share this post


Link to post
Share on other sites

Well, this looked like a VERY good alternative to the USPS Methods contrib until I got to the part about JQuery being required and not being able to run on pre-2.3.1 sites.

 

I have my site and several franchised operations out there running 2.2 and I'm not about to take them down and start from scratch with 2.3.1

 

Too bad, it's a good, clean contrib with enough functions to make it simple, yet effective but, for me, it's not worth all the work I'd have to do just to use it on all the US franchises.

 

Great work though.

Edited by Druid6900

No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites

Hi

running osCommerce 2.3.1

USPS module out of the box only showed library mail as shipping option

Installed USPS Methods and could not show First Class Parcel

Uninstalled USPS shipping

overwrote ALL catalog files with old backup files

Installed USPS Rate V4 - followed instructions

When I go to "check out" - checkout_shipping.php is blank

Am I missing something simple?

Should I have restored my database from an old backup?

Share this post


Link to post
Share on other sites

Help with your Fix!!! I install 2.3.1 about 6 weeks ago and was having issues with international rates. I saw your post and since its a new install I copied the files and ran the script provided. Now I get the following error. Any Ideas on how to correct. Or script to modify configuration_description. I tried manualy through the SQL Manager UI but looks like it does not work...

 

Thanks

 

1406 - Data too long for column 'configuration_description' at row 1

 

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Methods (Domestic and International)', 'MODULE_SHIPPING_USPS_TYPES', '0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00', 'Checkbox: Select the services to be offered

Minimum Weight (lbs)first input field

Maximum Weight (lbs):second input field

 

USPS returns methods based on cart weights. These settings will allow further control (particularly helpful for flat rate methods) but will not override USPS limits', '6', '0', 'tep_cfg_usps_services(array(\'First-Class MailRM Large Envelope\', \'First-Class MailRM Parcel\', \'Media MailRM\', \'Parcel PostRM\', \'Priority MailRM\', \'Priority MailRM Flat Rate Envelope\', \'Priority MailRM Legal Flat Rate Envelope\', \'Priority MailRM Padded Flat Rate Envelope\', \'Priority MailRM Small Flat Rate Box\', \'Priority MailRM Medium Flat Rate Box\', \'Priority MailRM Large Flat Rate Box\', \'Priority MailRM Regional Rate Box A\', \'Priority MailRM Regional Rate Box B\', \'Priority MailRM Regional Rate Box C\', \'Express MailRM\', \'Express MailRM Flat Rate Envelope\', \'Express MailRM Legal Flat Rate Envelope\', \'Express MailRM Flat Rate Boxes\', \'First-Class MailRM International Large Envelope**\', \'First-Class MailRM International Parcel**\', \'Priority MailRM International\', \'Priority MailRM International Flat Rate Envelope**\', \'Priority MailRM International Small Flat Rate Box\', \'Priority MailRM International Medium Flat Rate Box\', \'Priority MailRM International Large Flat Rate Box\', \'Express MailRM International\', \'Express MailRM International Flat Rate Envelope\', \'Express MailRM International Flat Rate Boxes\', \'USPS GXGTM Envelopes**\', \'Global Express GuaranteedRM (GXG)**\'), ', now())

 

[TEP STOP]

 

 

Jetta, Both Fields are Text. The issue is with Description. That was set to varchar(255) I modified it to varchar(510) and the module installs. BUT THEN You can not edit (Just disapears) an no functionality in products. To me it seems like to much data is being inserted into the description field by mistake and all other fields are now incorrect. Im installed on windows 7 with mysql 5. Could there be an issue in the sql command installing the module?

 

Thanks

 

PS I did a new install and database of 2.3.1 and updated the files for usps on the new install. And same problem.

Edited by jeffreyice1

Share this post


Link to post
Share on other sites

Hi:

Thanks for the reply. I am still working on the shipping module. I will figure it out eventually.

Share this post


Link to post
Share on other sites

Hi Jetta et al,

 

I've been reading this thread and still have some confusion about upgrading to the new Rate Calculator V4:

 

Will this module (USPS Rate V4 Intl Rate V2) work in OSCommerce 2.2?

Which is the the most recent version with the full set of files?

If I just want to make the changes USPS requires to use the new V4 Rate Calculator, are there instructions for just that?

 

Thanks for any help.

Share this post


Link to post
Share on other sites

Hi folks,

I am trying to run this version on my site and find it A PAIN! I am new to this and my web guy does not know much about commerce. My problem is are 2 fold.

  1. The rates are not showing the correct prices. They are .75 cents off. Parcel Post is .85 cents off. When I look at the USPS shipping site the priority price does not match mine on my site. I entered the same weight for both sites.
  2. Doing a test purchase shows the shipping module choosing first class large envelope for a product that weighs 1.6 pounds. Don't know how to make it choose a default that would be better suited.

 

I don't trust a customer to change the shipping option to the correct setting. I have this version and was careful to choose the latest from the commerce support site. I read on the fourm that many people are happy with the shipping module. I just wish that I was one of them and getting my site live on the internet. I cannot in good consious make it live knowing my site will be overcharging shipping.

 

Any help will be appreciated and I will send it on to my web guy.

 

Thanks,

Don

Share this post


Link to post
Share on other sites

Jetta,

 

I have installed your latest version of USPS module. I am having a few issues.

  1. An item that weighs 5 lbs is being choosen for a lrg 1st class envelope. It is first on the list. I would have thought that it would have defaulted to a parcel post. I need pp or regular priority to be picked when the item is heavy.
  2. All of my prices are .75 cents high. Comparing to the USPS site the prices are not the same. My flat rates are not correct. They should be the current going rate and they are not. Community sponsor Dunweb tells me that I cannot use flat rate on the USPS module unless I make separate zones. I don't understand why.
  3. I need to have an option for free shipping. This module my computer guy cannot get to work. http://addons.oscommerce.com/info/4475

 

I have read your posting as well as others stating how this module is esay to use. It has been anything but for me. Is it something we are doing or not doing correct? Many postings state that once they got this module installed the problems went away. I don't see anything be mentioned about problems like mine.

 

This is my first experience with commerce or a web site and my computer guy is not experienced in commerce either. I have been trying to get live now for a month working on the site, modules. I really would like to get this corrected and get live. Anybody that can help would really be appreciated.

 

Don

Share this post


Link to post
Share on other sites

I need to have an option for free shipping. This module my computer guy cannot get to work. http://addons.oscommerce.com/info/4475

 

Don

 

Hey Don,

 

That contribution was designed to work (haha) with osC v2.2, if you're running 2.3.1 it probably won't mix well.

Also check the support thread, lot's of problems with NO support. I'd look for another option.

 

Keep an eye on my thread maybe something will become helpful, especially for your computer guy.


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites

It's been a while. Sorry to miss all the questions.

 

@@Druid6900

 

This mod SHOULD work in 2.2 sites functionally. It just won't show the shipping options to customers. Jquery is only used to display EXTRA options to the customer, not to grab rates or display those. However, I have not tested it in a 2.2 shop, so I don't make any guarantees. PLUS, if you do want to use the jquery features, then just add a javascript include reference to your template_top file and link to one of the CDN hosted jquery files. For example: http://code.jquery.com/jquery-1.7.2.min.js

 

@@fqstore

 

USPS shouldn't even be returning 1st class rates for a 5 lb package. If that is the case, then it's possibly something in the script I'll need to look at.

 

Free shipping is supplied in the order totals module. Under shipping, you can select free shipping. Or, I'm sure there's an actual shipping mod out there that you can use as well. What you will find however, is that enabling free shipping will shut off the other options, so if your customer does want to upgrade shipping and pay extra, they are out of luck. There is also a contribution to bypass this so that free and paid shipping options will both show.

 

@@CrassOne

 

How is the new mod working in your 2.2 shop? Would you be so kind as to share your experience and the outcome?

 

NOTE TO ALL - this module uses functions that require PHP5.2 or higher. Since 5.2 was released two years ago, I would suspect that most shop owners have this version or better. If not, I'd suggest upgrading, not for the sake of this mod, but for the sake of all your scripts and any future upgrades you may want to make.

 

@@heritageorchards

 

I think this is something you set up in your configuration, under shipping/packaging. The USPS mod will not do the math as to a 70 lb and a 30 lb package. If your max package weight is set at 100 lbs, then USPS will only charge for their max weight (70 lbs). If your max weight is set at 70, then the core script will break your order into two packages. USPS will then divide the total weight (100 lbs) by 2 and will charge the base rate and extra services for two 50 lb packages, with one shared handling fee. So, you need to set a reasonable max package weight in your main configuration settings.

Share this post


Link to post
Share on other sites

I just loaded your add on. When I went to admin/modules and added USPS. then I went to edit it and received the following message: Fatal error: Call to undefined function tep_cfg_usps_services() in /home/content/l/a/d/lady3597/html/shop/catalog/admin/modules.php(232) : eval()'d code on line 1

 

Can you help?

Share this post


Link to post
Share on other sites

Did you add the function to the admin/functions/general.php file?

 

Biggest mixup is making the changes to the catalog/functions/general.php instead of admin functions.

Share this post


Link to post
Share on other sites

I have just finished installing this contribution on my 2.2 test shop. I skipped the checkout_shipping.php, as the readme said that it isn't used pre-2.3.1. Is this correct?

 

I am seeing one error in my checkout_shipping page, however...-2147219101 Missing value for Service.

 

Either (I assume) I do need to add the code for checkout_shipping, or do I need to register for the V4 API tools? I am already registered for the older API, not sure if that UserID is still usable with V4.

 

Ron

Share this post


Link to post
Share on other sites

Jetta, Any info on my post above?

 

Both Fields are Text. The issue is with Description. That was set to varchar(255) I modified it to varchar(510) and the module installs. BUT THEN You can not edit (Just disapears) an no functionality in products. To me it seems like to much data is being inserted into the description field by mistake and all other fields are now incorrect. Im installed on windows 7 with mysql 5. Could there be an issue in the sql command installing the module?

 

Thanks

 

PS I did a new install and database of 2.3.1 and updated the files for usps on the new install. And same problem

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

×