Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - USPS Methods


Recommended Posts

I am still not getting domestic rates at all - at least the page is not going blank on the dev cart

 

International works and is not reverting -- holding desired ship rate, it is adding the handling fee (tho I really prefer a seperate handling fee for int'l but so be it right now)

 

I still can not check/uncheck the int'l rates in the admin, I am not sure where to make that change

set_function varchar(1020)

I was able to comment out the nonused rates and they do not show on the client side

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

You need to change the 'set_function' field in the 'configuration' table to varchar 1020 originally it was set to varchar 255.

 

-J

 

ya just figured that out..

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

uninstall module, reinstall module and indeed there is everything to be checked/unchecked

Edited by wkdwich

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Hey Mabiem,

 

I was also having a problem before we fixed everything today. When I did new install the first time I did not remove the old install with the original files so it left some unwanted stuff in my db. I went back with the old files removed the original. Then uploaded new files and installed new fixes and it worked.

 

-J

 

Ok setting the 'set_function' field in the 'configuration' table to varchar 1020 fixed my Admin Panel Int'l shipping options issue.

 

I'm having a new issue. I have a test account with a domestic and international address.

 

I backed everything back to yesterday and was getting the original issue everyone is getting. I installed 5.0.1 (just coping the two files nothing else) with the module uninstalled. I re-installed the module and everything appears to work well. Once I select shipping int'l shipping I go back and try to switch to a domestic address and my checkout page goes blank. Nothing fixes it except reinstalling the original usps module files.

 

Mike

Link to comment
Share on other sites

sorry your phpmyadmin, but it seems you figured it out. Is everything now working for you?

 

I dont get where to make this change .. can you be more specific please?

Link to comment
Share on other sites

Is it working for you?

 

I've started over again from scratch several times with no luck.

 

I have this in my admin/.../general.php

 

------

// USPS Methods 3.0

 

// Alias function for Store configuration values in the Administration Tool

 

function tep_cfg_select_multioption($select_array, $key_value, $key = '') {

 

for ($i=0; $i<sizeof($select_array); $i++) {

 

$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');

 

$string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"';

 

$key_values = explode( ", ", $key_value);

 

if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED';

 

$string .= '> ' . $select_array[$i];

 

}

 

$string .= '<input type="hidden" name="' . $name . '" value="--none--">';

 

return $string;

 

}

-------

 

Do I replace it with the 5.0.1 code? Leave it? Or include both codes?

Link to comment
Share on other sites

OK, I made a clean new install with USPS Methods 5.0.1, including the fix file. The configuration page looked great and it looks like it coincides with all the new separate services that USPS added in this catastrophic update - so that's good. It didn't seem like we were getting that far last night. Anyway ...

 

1. First, I got the mail server error message mentioned above just accessing my home page. I commented that out and proceeded. International seemed to work, but I can't get First Class International (I only pick Express Mail Int, Priority Mail Int, and First Class Int for my International customers.)

 

2. Second, I left that and checked Domestic (it was working with my USPS Methods 2.9.6). Now it blows up on the checkout page and I get this error:

 

Fatal error: Call to undefined function: htmlspecialchars_decode() in D:\home\xxxx\xxxxx\oscommerce2\catalog\includes\modules\shipping\usps.php on line 405

 

I saw this error a couple of times last night when trying the stuff that was going on with the forum then - where is it supposed to find the "htmlspecialchars_decode" function?

 

Meanwhile, I'll drop back to my old install - at least my Domestic was working OK. :(

 

 

EDIT: OK - rolled everything back and I'm OK with Domestic, back to

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.

on the International checkout page. Edited by TomB01
Link to comment
Share on other sites

Hey Mike,

 

I did not change anything in my general.php file. All i did was do a clean install with the 5.01 usps contribution and made the database change I mentioned in my previous post. Did you back up your general.php file?

 

-J

 

I've started over again from scratch several times with no luck.

 

I have this in my admin/.../general.php

 

------

// USPS Methods 3.0

 

// Alias function for Store configuration values in the Administration Tool

 

function tep_cfg_select_multioption($select_array, $key_value, $key = '') {

 

for ($i=0; $i<sizeof($select_array); $i++) {

 

$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');

 

$string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"';

 

$key_values = explode( ", ", $key_value);

 

if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED';

 

$string .= '> ' . $select_array[$i];

 

}

 

$string .= '<input type="hidden" name="' . $name . '" value="--none--">';

 

return $string;

 

}

-------

 

Do I replace it with the 5.0.1 code? Leave it? Or include both codes?

Link to comment
Share on other sites

Hey Mike,

 

I did not change anything in my general.php file. All i did was do a clean install with the 5.01 usps contribution and made the database change I mentioned in my previous post. Did you back up your general.php file?

 

-J

 

Yes, the code above is from the original.

 

I'll try one last time by replacing the 2 files and expanding the one database field and report back.

 

Thanks!

Link to comment
Share on other sites

Ok, sounds good. Let me know.

 

Yes, the code above is from the original.

 

I'll try one last time by replacing the 2 files and expanding the one database field and report back.

 

Thanks!

Link to comment
Share on other sites

The blank page is not an issue on my Dev cart.. havent tried it on the live cart.. I simply uploaded the 5.0.1 with the newest revised file, uninstalled, reinstalled and whamo there it was, working.. almost..

 

yes I found the set_function setting in phpmyadmin and now I can see and check/uncheck

 

BUT I am not getting domestic rates.. only international

 

I was running USPS Methods 4.3.2 Fix international services Jan 8, 2010 and THAT contrinution does have some mod's to functions/general.php on both the client and admin side.. that COULD be my issue..

 

Also to put another nail in the mix, I do run oscMAX not vanilla osc.. and it is highly modified.. so it could be any number of things that is making a mess of this

 

I'll get back at it tonight

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

That is weird. I run Creloaded B2B on my stores and it all works well now just with the new 5.0.1. module.

 

The blank page is not an issue on my Dev cart.. havent tried it on the live cart.. I simply uploaded the 5.0.1 with the newest revised file, uninstalled, reinstalled and whamo there it was, working.. almost..

 

yes I found the set_function setting in phpmyadmin and now I can see and check/uncheck

 

BUT I am not getting domestic rates.. only international

 

I was running USPS Methods 4.3.2 Fix international services Jan 8, 2010 and THAT contrinution does have some mod's to functions/general.php on both the client and admin side.. that COULD be my issue..

 

Also to put another nail in the mix, I do run oscMAX not vanilla osc.. and it is highly modified.. so it could be any number of things that is making a mess of this

 

I'll get back at it tonight

Link to comment
Share on other sites

It may all depend on how modded your cart is, I'm assuming it was working before right?

 

I'm still getting a blank domestic page. Completely blank (white).

 

I think I may have had a really old version usps shipping methods?

Link to comment
Share on other sites

It may all depend on how modded your cart is, I'm assuming it was working before right?

 

Yes everything was working until yesterday. I can backup to that point. My issue was common.

 

-Weird characters on the domestic page

-No int'l shipping options

 

I haven't installed a ton of mods.

 

Thank you for the help.

 

Mike

Link to comment
Share on other sites

Ya,

 

Int'l is fine.

 

If I enable any shipping option in Domestic (priority, EXP, parcel, Media) I get a white screen on the shipping page.

 

Any ideas?

 

I have a newer backup at home. I'll try that.

 

Mike

Edited by mabiem
Link to comment
Share on other sites

Ya,

 

Int'l is fine.

 

If I enable any shipping option in Domestic (priority, EXP, parcel, Media) I get a white screen on the shipping page.

 

Any ideas?

 

I have a newer backup at home. I'll try that.

 

Mike

 

 

A backup is not going to help you I think. USPS changed they way the communication happens between the module and their servers.

 

A very old USPS module indeed might not have some functions needed for 4.xx and up or even prior to that if memory serves me that were in functions/general.php both admin and client side

 

I am going to .. well I'm lost here too now.. not sure where I am going with this just yet

 

I'm wondering if one of yu fine folks would make a complete repackage of this repaired version so I can do a compare. My biggest issue is the version fulluvscents made the repair on is the version I was using. Mine had all kinds of seperaate option in weight thresholds for various shipping rates, allowed a sperate handling charge for int'l from domestic.

 

jjvillarinc: I agree that cre or max, drop this in it should just work.. thats why I am so lost as to where to go

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

A backup is not going to help you I think. USPS changed they way the communication happens between the module and their servers.

 

A very old USPS module indeed might not have some functions needed for 4.xx and up or even prior to that if memory serves me that were in functions/general.php both admin and client side

 

I am going to .. well I'm lost here too now.. not sure where I am going with this just yet

 

I'm wondering if one of yu fine folks would make a complete repackage of this repaired version so I can do a compare. My biggest issue is the version fulluvscents made the repair on is the version I was using. Mine had all kinds of seperaate option in weight thresholds for various shipping rates, allowed a sperate handling charge for int'l from domestic.

 

jjvillarinc: I agree that cre or max, drop this in it should just work.. thats why I am so lost as to where to go

I've been running 2.9.6 and suspect that may be causing some of my problems as well. I agree that someone (please, please!) needs to construct a contrib that gathers everything (probably some mySQL code is needed, too) so that we can accomplish a completely fresh, up-to-date install.

Link to comment
Share on other sites

Oh thank you all for the work you did today! I was following the page almost all day trying to sort this out!

And now everything works great!

 

Expecially the last issue of the international not showing up - and an error message that showed when I clicked Edit the USPS Methods

Editing the database to increase the length fixed my last couple issues!!

 

Thank you all again soo much!

 

For those who are still having issues - take your time, read thought these posts and make sure to do the following things:

Download and install the newest update for USPS Methods - one came out today.

and Do the edit in the database that was mentioned a few posts ago!

 

Can't remember what else I did that cause it to work again..as I tried soooo many things!

 

but have hope and keep trying! It is fixable!

Link to comment
Share on other sites

Have loaded 5.0.1 with fixed file back to my live cart

 

installed and changed nothing but added my ID

previosuly edited set_function from 255 to 1020

 

all rate options had checkable boxes

 

Domestic shipping address used - got totally blank page

 

uncheck ALL the domestic rates, refresh still with domestic shipping address - now the page comes back but "An error occured with the USPS shipping calculations." - this should not show at all with no domestic rates checked

 

switch to international address

domestic rates still unchecked everything fine, get full array of rates

 

re-check all domestic rates, refrsh int'l rates still displayed properly

 

 

So right now I will leave this as is working poorly but working..

 

International is fine, domestic still kicking the error, but I do have a table rate set up also, so that shows for them

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

I've been running 2.9.6 and suspect that may be causing some of my problems as well. I agree that someone (please, please!) needs to construct a contrib that gathers everything (probably some mySQL code is needed, too) so that we can accomplish a completely fresh, up-to-date install.

 

I'm working right now to gather all addiitons to any files that have anything to do with USPS or "Greg Deeth" since his name is in many of the changes and file if not al of them :)

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

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