Jump to content
fulluvscents

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

Recommended Posts

@@spiritalan I feel your pain. I have a background in tech Writing, and I have to say, the instructions included with this module are far from clear. I don't want to bag on Jetta because I believe she is a very good coder (my PHP skills are not on her level) but this problem is an overarching problem shared by the open source world: not enough clear documentation and not enough support.

 

I went through the same gymnastics today with my attempt at this module. I have a bit of intuitive programmer's sense and I thought it would get me further than it did. In the end, I was not able to install this module in spite of the fact that I also followed the instructions closely.

 

Please...someone, we need some help here.

 

Cheers,

 

DesertCoder

Share this post


Link to post
Share on other sites

@@spiritalan The blank screen is caused by an error. Check the page source to see if the error is hidden there (near the end). then check your PHP error log, or turn on error messages in your application_top.php:

 

// set the level of error reporting
//  error_reporting(E_ALL & ~E_NOTICE);
 error_reporting( E_ALL );

 

Come back when you have an error message and we'll be able to tell you more.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

This is regarding the contribution “USPS Rate V4 Intl Rate V2 - v.1.7 - FIX”, uploaded Feb. 12, 2012. Can someone explain to me why the changes in the readme.txt file for /checkout_shipping.php are not the same as in the checkout_shipping.php files found in Files_to_Modify and Drop_On_Top folders for the catalog directory? This is very confusing.

 

I have been working on my new OSC 2.3.3 store in development to take the place of my 2.2RC2a store but after working for about 3 days in trying to make this USPS contribution work I have come to the end of my wits. I have used the Drop_On_Top files, it does not work. I have used the new files and Files_to_Modify by comparing originals and modifying them and it still does not work. I have followed the readme.txt file to the letter and modifying original files and it still does not work. I have taken files from another with the same contribution from a friend, (whose store is working with this USPS contribution) with the update of January 2013 and replaced my files with them and I still receive on checkout a blank page. HELP!!!

 

I removed the existing USPS Module in Admin, then upload proper files, then install new module, then configure the module. The best response that I have gotten is when I manually make the modifications of the originals using the readme.txt file. At least I can configure it in Admin, but on the Front end on checkout I get a blank screen.

 

I know there is more than one question in this post. Please help. I am an OSC veteran user and cut and paster but not a coder.

 

Thanks, Alan

I just realized that the contribution's coding for each checkout_shipping.php differs from a manually edited checkout_shipping.php. No idea what that extra code is for. Don't really care. Just don't use it.

Normally I'd post my own checkout_shipping.php for people to compare, but I'm working on an in-progress osC 2.3.4 which makes all this code splicing problematic. Figuring out what codes work and what doesn't is a pain.

File compare and Drop_On_Top becomes pointless because I think the contribution was originally coded for osC 2.3.1 and not osC 2.3.3.

 

I've successfully installed this about an hour ago using just the two files in New_Files folder plus readme.txt. I posted my procedures here as a response to another person's post and I hope it helps (I know it's in the wrong forum): http://forums.oscommerce.com/topic/392398-usps-shipping-module-help/

Share this post


Link to post
Share on other sites

@@spiritalan The blank screen is caused by an error. Check the page source to see if the error is hidden there (near the end). then check your PHP error log, or turn on error messages in your application_top.php:

 

// set the level of error reporting
// error_reporting(E_ALL & ~E_NOTICE);
error_reporting( E_ALL );

 

Come back when you have an error message and we'll be able to tell you more.

 

Regards

Jim

 

Hello Jim,

I found a php error in one of the logs; here it is:

 

PHP Fatal error: Call to undefined function json_decode() in /var/www/vhosts/domain_name.com/subdomains/dev/httpdocs/includes/modules/shipping/usps.php on line 296, referer: http://dev.domain_name.com/shopping_cart.php

 

The blank page is checkout_shipping.php when I leave shopping_cart.php.

 

I hope this is helpful.

Thanks,

Alan


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

json_decode() is a PHP function introduced in version 5.2. Apparently your version of PHP is older than this. You cannot use this module unless you upgrade your copy of PHP.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Jim,

My php version is 5.1.6. I guess that solves that and lets me know what direction I'll have go to next.

 

It seems to me than when programmers use new functions to these contributions it ought to follow that it be stated in the Addon (like in the readme.txt file) that a "requirement" for a minimum PHP version be used. It would save a lot of headaches, not to mention many hours of lost work.

 

One good thing did come out of it. I found where my error logs are located.

 

Thanks for your help. I appreciate it.

Alan


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

I installed this USPS shipping module and now my site is down with this error:

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Warning: include() [function.include]: Failed opening 'includes/classes/action_recorder.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/osc_template.php' (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

 

Can anyone help please?

 

The 'application_top.php' file IS there, so I'm not sure what is happening.

thank you!

 

I'm also looking for someone to give me a hand with this so if your reading and do some side work, let me know.

Share this post


Link to post
Share on other sites

@@suzgems1,

 

It's not the application_top.php file that's missing. It's the file action_recorder.php that is being called from application_top.php in line 302 (of my osc application_top.php file anyway):

 

301 // action recorder
302 include('includes/classes/action_recorder.php');

 

Then in lines 426-431 (again, at least in my application_top.php file):

426 // auto expire special products
427 require(DIR_WS_FUNCTIONS . 'specials.php');
428 tep_expire_specials();
429
430 require(DIR_WS_CLASSES . 'osc_template.php');
431 $oscTemplate = new oscTemplate();

 

osc_template is being called and it can't find it.

 

 

So error by error, here's what I see is going on:

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Warning: include() [function.include]: Failed opening 'includes/classes/action_recorder.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Check in the /includes/classes/ folder for action_recorder.php if it's not there, try copying the file into the folder and see if it clears these warnings.

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/osc_template.php' (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

Again, check in the /includes/classes/ folder for osc_template.php if it's not there, try copying the file into the folder and see if it clears this warning and fatal error.

 

It is possible that your installation got messed up or perhaps the code in your application_top.php file is not correct or contains an error or is corrupted.

 

Check for the files in:

/includes/classes/action_recorder.php

/includes/classes/osc_template.php

 

to see if they are there. The warnings and fatal error are suggesting those files are not available.

 

I hope this helps!

 

Sincerely,

 

DesertCoder

Edited by DesertCoder

Share this post


Link to post
Share on other sites

@@suzgems1,

 

It's not the application_top.php file that's missing. It's the file action_recorder.php that is being called from application_top.php in line 302 (of my osc application_top.php file anyway):

 

301 // action recorder
302 include('includes/classes/action_recorder.php');

 

Then in lines 426-431 (again, at least in my application_top.php file):

426 // auto expire special products
427 require(DIR_WS_FUNCTIONS . 'specials.php');
428 tep_expire_specials();
429
430 require(DIR_WS_CLASSES . 'osc_template.php');
431 $oscTemplate = new oscTemplate();

 

osc_template is being called and it can't find it.

 

 

So error by error, here's what I see is going on:

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Warning: include() [function.include]: Failed opening 'includes/classes/action_recorder.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 306

 

Check in the /includes/classes/ folder for action_recorder.php if it's not there, try copying the file into the folder and see if it clears these warnings.

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/osc_template.php' (include_path='.:/usr/local/php5/lib/php') in/home/content/s/u/z/suzgems/html/includes/application_top.php on line 434

 

Again, check in the /includes/classes/ folder for osc_template.php if it's not there, try copying the file into the folder and see if it clears this warning and fatal error.

 

It is possible that your installation got messed up or perhaps the code in your application_top.php file is not correct or contains an error or is corrupted.

 

Check for the files in:

/includes/classes/action_recorder.php

/includes/classes/osc_template.php

 

to see if they are there. The warnings and fatal error are suggesting those files are not available.

 

I hope this helps!

 

Sincerely,

 

DesertCoder

 

Yes DesertCoder - That helped a lot ! Neither one of those files are there.

 

I've looked in back ups, and there not there either.

 

Where can I find them, or get them?

 

Thank you very much.

Share this post


Link to post
Share on other sites

@@suzgems1 What version of osCommerce do you have? It sounds like you've installed an addon intended for osC 2.3x into a 2.2x store. That won't work, at least without a large amount of work.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@suzgems1 What version of osCommerce do you have? It sounds like you've installed an addon intended for osC 2.3x into a 2.2x store. That won't work, at least without a large amount of work.

 

Regards

Jim

 

I have Version: 2.2-MS2

 

I thought it said in the documentation that it was for 2.2x, and hadn't been tested yet for 2.3?

Share this post


Link to post
Share on other sites

action_recorder.php and osc_template.php are only found in the osC 2.3x series. While this module works just fine with both 2.2 and 2.3 series, the copy of application_top.php that is included is 2.3 only. You need to revert to your backup of that file and add any changes manually. Do the same for all of the files except the ones in the New_Files folder. Look in the readme.txt under STEP BY STEP FILE MODIFICATIONS for the instructions.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

action_recorder.php and osc_template.php are only found in the osC 2.3x series. While this module works just fine with both 2.2 and 2.3 series, the copy of application_top.php that is included is 2.3 only. You need to revert to your backup of that file and add any changes manually. Do the same for all of the files except the ones in the New_Files folder. Look in the readme.txt under STEP BY STEP FILE MODIFICATIONS for the instructions.

 

Regards

Jim

 

Hi Jim -

 

Isn't there just a simply way I can add USPS shipping to my site? It's been weeks of trying to do something simple as to add shipping. There are so many modules available. Can you point me to the right one for my version software? thank you.

Share this post


Link to post
Share on other sites

This is the best module available, both in features and code quality. You can install it on any 2.2 or 2.3 version of osCommerce. All you have to do is follow the instructions.

 

Your version of osCommerce is ancient (vintage 2003) and no longer well supported. You are going to have this problem any time you try to add something to your site. It's probably time to think about upgrading to something more modern.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation As a tech writer, I find the instructions for this module to be unclear. There are the files in the Drop_On_Top folder where the instructions say to, 'Do your thing!' Well, that's not too helpful. Because after that there are instructions for what to do if one has a modified version of osc...but there is no mention as to WHAT constitutes a modified version.

 

Then there are other files in other folders, some of which have SOME of the added code shown in the instructions, but they don't have ALL of the code changes listed in the instructions. It's as though there are three ways once can approach this. For seasoned osc users, this may be a no-brainer, but for those of us who are new at it, these instructions are lacking big time.

 

Which is why we are all here. We need HELP. I can't afford to go buy a pre-built package alternative to osc and neither can many of my clients. But with open-source kits, we are stuck with minimal documentation, sparse help on forums and lots and lots of waiting and research. This is thebane of open-source anything. Sure it's free but the time we spend trying to understand how it works so we can tailor it to our needs costs us more in the end.

 

I followed the instructions for this module twice, and in both cases the module included with osc was never replaced with this new one. This is an absolutely frustrating scenario, and each, 'Oh, it's so easy' statement, when it is clearly not easy just makes this all the more frustrating.

 

Cheers,

 

DesertCoder

Share this post


Link to post
Share on other sites

Most programmers are terrible at writing documentation. Commercial software is often no better documented than the open source equivalents.

 

If you have installed another module, uninstall that one before starting to add this one.

 

A modified version of osCommerce is one that has had other changes made to it, either another addon or custom code mods. It also means a different version than this addon was designed on. In this case, that's the 2.3x series of osCommerce. The file in the includes/modules/ directory can be just copied over the existing file, but the others should be checked first. I suggest using your comparison program to compare the remaining files in the Drop_On_Top folder with the ones in your store.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

This is the best module available, both in features and code quality. You can install it on any 2.2 or 2.3 version of osCommerce. All you have to do is follow the instructions.

 

Your version of osCommerce is ancient (vintage 2003) and no longer well supported. You are going to have this problem any time you try to add something to your site. It's probably time to think about upgrading to something more modern.

 

Regards

Jim

 

Jim -

 

I'm in the process now of moving my site from one hosting plan to another.

I can now upload a newer, better version of OS Commerce as you are suggesting above, as I've know it's quite outdated.

 

Do you think is a good idea to either:

a) reinstall with the former version I had (I have Version: 2.2-MS2) to get it all up and running, then upload a new version of OS Commerce and do the transfer process then?

 

or

 

B) Simply start with a newer version of OS Commerce (another 2.2 or 2.3 version) directly and do my best to get that working with my files.

 

What are your thoughts?

 

Attempting to upload a new version of OS Commerce for my site now.

 

Thank you Jim!

Share this post


Link to post
Share on other sites

If you want my advice if you are moving hosting, take what you have with you. Then if you want to rebuild do so as a proper project under a test folder/store. When it is all working only then upgrade your actual live site


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites

I agree.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

There are not any instructions on how to use.

I only sell CD's at my store, how can I use this shipping add-on?

Share this post


Link to post
Share on other sites

Im having trouble. I get the same problems as rwest

 

Quote:

"Well, I do have my zip configured for my store. I notice that after I edit and save the services, text gets stored in the min and max fields. Initially for 1st-Class Lg. Env min=0 max=70 and Handling=0.00. After saving this, and going back in, the values have now changed. min=First Class Mail max=0 and Handling=70. Also, the selection checks get cleared.

Thank you.

I must of re-installed the different contributions like 15 times. I also double checked the code with the drop on files and modify files. I copied and pasted the code over and over just in case I was missing something. I also tried my own modifications to the php and ended up reverting it back to the original contribution. I read almost every page to every USPS contribution over and over as well as googled it and went to zencart forums.

 

I feel like a zombie right now. UPS is fine but my USPS checkbox never saves and changes my min and max values to priority mail. Ive been using oscommerce for about 8 years and made over 10 sites and never had this issue with the same contributions. I'm really about to give up and drop OSC like everyone recommends. Please help.

Share this post


Link to post
Share on other sites

Please help me. My shipping module works fine from what I can see, but I don't know how to setup for CD sales.

Do I set a weight for each product?

Right now, the shipping says 3lbs 0oz.

I checked the box for Media, assuming that is the media mailers which are only 2.50

However, price is quoted 3.58 for the order. And it is not dependent on how many CD's you put in cart. You can load up the cart and still only have to pay 3.58.

What units should I use for the weight when adding new products?

 

Example: http://mtrosemedia.tk/store/

Edited by newburns

Share this post


Link to post
Share on other sites

@@newburns

 

the cost of shipping is caluclated by the pound with the usps add on, so a one pound item would be 1

an 8 oz item would be .5 in your product add/edit page

a 4 oz item would be .25 and so on

 

as well you have to have the correct tare weight in your settings because the total weight is tare plus product weight

 

hope that makes sense


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

Is there a reliable fix for this problem:

 

Radio buttons on the product edit page (for restricting USPS methods) randomly become unchecked when i reload the product edit page. It is not always the same button, but it it often Small Flat Rate Box.

 

I have the USPS Rate V4 Intl Rate V2 - 01-27-13 Update

 

Thanks in advance!

Isaiah

Rom 8

Share this post


Link to post
Share on other sites

Hello,

 

I have finally succeeded in getting this module installed, and am grateful for the information shared in this forum that led me to my success. I have installed it now in a number of stores, four so far, and have a new question:

 

Does this module only work with PHP 5.3-up? I did some digging in the main osc forum and recall seeing this mentioned.

 

The reason I ask is because one of the stores works just fine with the new USPS module installed, two of the others though show no shipping options and they are connected to the USPS production servers.

 

This led me to check the PHP versions for these two stores and one is 5.2.17, the other is 5.2.6-1+lenny9 which I understand is a Debian release.

 

Is this the reason I get no shipping rates or is there another reason?

 

As these two stores are on shared hosting, if the problem is indeed the PHP version, do I have any alternatives to using this module? As you may imagine, the clients want their stores up now and I will have to explain some tech to them if this is the case.

 

Many thanks in advance!

 

Sincerely,

 

DesertCoder

Edited by DesertCoder

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

×