Jump to content
bad_lemming

[Contribution] - USPS Methods

Recommended Posts

What version of OSC are you using? Just wondering since I am still using 2.2.

 

I am using v2.2.

Share this post


Link to post
Share on other sites

In includes/classes.xml_5.php, find this code (lines 25-26)

 

 $xml_parser = &new XML();
$data = &$xml_parser->parse($xml);

 

and replace it with this

 

 $xml_parser = new XML();
$data = $xml_parser->parse($xml);

 

I haven't tested that, so please let me know if it works.

 

Regards

Jim

 

Hi Jim,

 

That took care of that, but now when clicking save I get this,

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/****8/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/******/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/*****/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/******/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/******/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/******/modules.php on line 40

 

Deprecated: Function ereg_replace() is deprecated in /home/wihirt/public_html/catalog/******/modules.php on line 40

 

Warning: Cannot modify header information - headers already sent by (output started at /home/wihirt/public_html/catalog/addy/modules.php:40) in /home/wihirt/public_html/catalog/******/includes/functions/general.php on line 34

 

Please advice

 

Cheers

Edited by pederb

-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

It appears that you're trying to run an old version of osCommerce on PHP 5.2 or higher. You're going to have a lot of these warnings that need to be fixed or hidden. If you want to do all that work, try searching the forum for "Function ereg_replace() is deprecated" (without the quotes.)

 

It might be easier for you to start with osC 2.3.1, since it already is PHP 5.2 compatible, and just move over your products and customers.

 

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

It appears that you're trying to run an old version of osCommerce on PHP 5.2 or higher. You're going to have a lot of these warnings that need to be fixed or hidden. If you want to do all that work, try searching the forum for "Function ereg_replace() is deprecated" (without the quotes.)

 

It might be easier for you to start with osC 2.3.1, since it already is PHP 5.2 compatible, and just move over your products and customers.

 

Regards

Jim

 

Hi Jim,

 

I do have 2.3.1


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

Hi Jim,

 

I do have 2.3.1

 

No, you do not. 2.3.1 does not use ereg_replace() anywhere. If you started with 2.3.1, you have overwritten files with older 2.2x files. This is a really bad idea, and will cause you all sorts of problems. You should put the 2.3.1 version of the file back up and make any changes needed by hand.

 

Regards

Jim

Edited by kymation

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

Share this post


Link to post
Share on other sites

@@tomalok & @@sml - We are in the same boat. Did you guys find a solution?

 

Ok, here is what I did, I uninstall 6.1a, reinstall 5.2.2 and change 3 lines of code and it works like a charm.

 

'First-Class Mail Int Package' => 'First-Class Mail regimark International Package**',

to

'First-Class Mail Int Package' => 'First-Class Mail regimark International Parcel**',

 

'First-Class Mail regimark Package';

to

'First-Class Mail regimark Parcel';

 

case 'First-Class Mail regimark Package':

to

'First-Class Mail regimark Parcel';

Edited by sml

Share this post


Link to post
Share on other sites

@@sml - 5.2.2 installed fine and seemed to work. I did find that it is adding an extra ounce to the overall weight - resulting in higher postage charged.

I thought I recalled reading about this problem but can't seem to find the posts...

Share this post


Link to post
Share on other sites

Someone emailed me about international first class not working. Don't have time to sort through the thread and find the post.

 

But, I don't see any problems with int'l first class. Remember, it only works for up to 4 lbs.

Share this post


Link to post
Share on other sites

No, you do not. 2.3.1 does not use ereg_replace() anywhere. If you started with 2.3.1, you have overwritten files with older 2.2x files. This is a really bad idea, and will cause you all sorts of problems. You should put the 2.3.1 version of the file back up and make any changes needed by hand.

 

Regards

Jim

 

Are you saying that your contribution do not work on the newer 2.3.1?

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

My contribution? I didn't write this one. No, I was telling you the correct way to add 2.2x code into 2.3.1.

 

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

My contribution? I didn't write this one. No, I was telling you the correct way to add 2.2x code into 2.3.1.

 

REgards

Jim

 

Ok, any idea how to correct this?

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

Hey guys. Wow. Ya know, I think I've got 5.2.1 or 5.2.2 running on my site (osc2.2). I never ran into any issues with the changes on the 22nd. Everything is fine and dandy.

 

I did decide to write a new module though because well, I'll be honest. The scripting for the old one was pretty hacked up. This one was written and tested on a 2.3.1 site. It is a very stripped down module, without any frills. I figured I would upload it at it's barest point and add to it from there. I will be the sole maintainer of that contribution so the updates will stay clean and understandable.

 

Note that USPS methods has gotten to a whopping file size, with FAR too many intrusions into the database, other pages, etc... It's actually gotten downright silly. Not everyone wants to spend an hour or two or DAYS uploading and dealing with the frustration of what should be a simple postage calculator. And unfortunately, stock 2.3.1 doesn't even come with a V4 compatible module. So, hopefully, this will fit the bill for those who want a working, efficient, and very easy to install USPS shipping calculator.

 

The new module can be found here:

http://addons.oscommerce.com/info/8327

 

And I have started a support thread here:

http://forums.oscommerce.com/topic/383307-usps-rate-v4-intl-rate-v2-official-support-thread/

Share this post


Link to post
Share on other sites

I'm in the same boat of no First-Class Domestic appearing with v6.1a. Everything else works great.

 

Has anyone found a solution for this other than downgrading to 5.22?

 

Thanks,

PHRoG

Share this post


Link to post
Share on other sites

Quick ?. I'm on 5.0.1 methods. Is going to 5.2.2 just a switch of usps.php or are there other code changes elsewhere? At work and can't d/l the file. I noticed my first-class rates for international are really high for some reason. Even at .01lb its like $6 shipping instead of like $3.50 or so.

Share this post


Link to post
Share on other sites

Hey guys. Wow. Ya know, I think I've got 5.2.1 or 5.2.2 running on my site (osc2.2). I never ran into any issues with the changes on the 22nd. Everything is fine and dandy.

 

I did decide to write a new module though because well, I'll be honest. The scripting for the old one was pretty hacked up. This one was written and tested on a 2.3.1 site. It is a very stripped down module, without any frills. I figured I would upload it at it's barest point and add to it from there. I will be the sole maintainer of that contribution so the updates will stay clean and understandable.

 

Note that USPS methods has gotten to a whopping file size, with FAR too many intrusions into the database, other pages, etc... It's actually gotten downright silly. Not everyone wants to spend an hour or two or DAYS uploading and dealing with the frustration of what should be a simple postage calculator. And unfortunately, stock 2.3.1 doesn't even come with a V4 compatible module. So, hopefully, this will fit the bill for those who want a working, efficient, and very easy to install USPS shipping calculator.

 

I'm on 5.0.1 and was fine by changing "package" to "parcel". I did notice my first class int. rates are a bit high no matter what I do. I decided to up to 5.2.2 but when I click edit to go in and adjust the settings in the module it just gets a blank page, well it expands the page with the list of modules and does nothing. Any idea. I skipped step 10 like it says if going from a previous version.

Share this post


Link to post
Share on other sites

Ok, here is what I did, I uninstall 6.1a, reinstall 5.2.2 and change 3 lines of code and it works like a charm.

 

'First-Class Mail Int Package' => 'First-Class Mail regimark International Package**',

to

'First-Class Mail Int Package' => 'First-Class Mail regimark International Parcel**',

 

'First-Class Mail regimark Package';

to

'First-Class Mail regimark Parcel';

 

case 'First-Class Mail regimark Package':

to

'First-Class Mail regimark Parcel';

 

This worked perfectly. But I tend to agree that this contrib makes A LOT of database queries that seem unnecessary. When USPS Rate V4 Intl Rate V2 - v.1.0 has a little more functionality, like adding handling fees to different classes, I think I will install this so my site runs more efficiently. Thanks again!!!

Share this post


Link to post
Share on other sites

@@tomalok

I've just uploaded "6.1a", incorporating the Package -> Parcel text changes, and cleaning up some cruft that was in the 6.1 zip.

 

Where do I find this 6.1a package?

Share this post


Link to post
Share on other sites

http://addons.oscommerce.com/info/8327

 

is fully stabilized and matured. My intent was to start with simple, and add features, so that there would be some options. Some people want the features (me), and some don't. No need to force it on them.

 

I would recommend testing it. If you run into any bugs, then please report them on the appropriate forum. With the exception of any potential bugs (which I don't anticipate whatsoever), this is what it is, and there won't be any additional options or features.

http://forums.oscommerce.com/topic/383307-usps-rate-v4-intl-rate-v2-official-support-thread/

 

Jetta

Share this post


Link to post
Share on other sites

Downloaded latest version & updated.

 

Still working fine, however not getting first class shipping option. Threshold is set for 12. Item in cart shows as 1 pkg, 0.39 lbs total

 

Media Mail, Priority Etc are all showing. All the options for first class are also checked.

 

Any idea why these are not showing up? Thank you

 

Kieran Mullen

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

×