Jump to content
Latest News: (loading..)
Sign in to follow this  
primordialstuff

USPS Module Help Please!

Recommended Posts

***ok, now i've taken some spaces out of the bottom of the usps.php and am not getting the error message anymore, but when I go to my admin to try to install the usps module again, it's there, but it won't open the module. What did I mess up?

 

 

What exactly is everyone talking about when you talk about upgrade your sql

I followed every fix nothing is working,still getting express charge

Share this post


Link to post
Share on other sites

From your fellow Newbie:

 

I believe what's being discussed database-wise is the field configuration_value in the table configuration in the OSCommerce database. I believe this field needs to be 255 bytes to accomodate the new USPS module and, in addition, has to be updated with the update_sql.php file included with the new USPS contribution. At least that's the understanding I've labored under in one of my many attempts to get this module to work. MyPHPAdmin is a database administration tool that makes SQL access and administration of our databases easy...it's probably available somewhere in your toolbox under a "database" link. I suggest you use it to browse the configuration table and see what values you have loaded for your USPS module. If you don't have the values you expect, that could be the problem and you'll need to expand the field to 255 and load the correct values into it. Hope this works for you.

 

Although I've learned quite a bit in the process, I've also given up and we're just using Zone shipping. I have other fish to fry at the moment, but may return to it later. I'm rather hopeful someone makes a contribution that requires less skill/work to install. Good luck.

 

Brent

Share this post


Link to post
Share on other sites
Thanks everybody, you saved my arse again. That's what I love about Open Source community :) I wasn't the only one freaking out and whew...

 

All I did was edit my existing usps.php with the new stuff from the new contribution:

 

$this->types = array('EXPRESS' => 'EXPRESS', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'PRIORITY', 'PARCEL' => 'Parcel', 'BPM' => 'Bound Printed Material', 'LIBRARY' => 'Library', 'MEDIA' => 'Media Mail');

 

$this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed',

'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',

'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',

'EXPRESS MAIL INT' => 'Express Mail International (EMS)',

'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat Rate Envelope',

'PRIORITY MAIL INT' => 'Priority Mail International',

'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat Rate Envelope',

'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat Rate Box',

'FIRST-CLASS MAIL INT' => 'First-Class Mail International');

 

Then applied their update.sql:

 

UPDATE configuration

SET configuration_value = UPPER(configuration_value),

set_function='tep_cfg_select_multioption(array(''GLOBAL EXPRESS'', ''GLOBAL EXPRESS NON-DOC RECT'', ''GLOBAL EXPRESS NON-DOC NON-RECT'', ''EXPRESS MAIL INT'', ''EXPRESS MAIL INT FLAT RATE ENV'', ''PRIORITY MAIL INT'', ''PRIORITY MAIL INT FLAT RATE ENV'', ''PRIORITY MAIL INT FLAT RATE BOX'', ''FIRST-CLASS MAIL INT''), '

WHERE configuration_key='MODULE_SHIPPING_USPS_TYPES_INTL';

 

UPDATE configuration

SET configuration_value = UPPER(configuration_value),

set_function='tep_cfg_select_multioption(array(''EXPRESS'', ''PRIORITY'', ''FIRST CLASS'', ''PARCEL'', ''BPM'', ''LIBRARY'', ''MEDIA''), '

WHERE configuration_key='MODULE_SHIPPING_USPS_TYPES'

 

Seems like it fixed it. Tested Domestic and international orders. Nice of USPS to warn us eh?

 

J

 

 

THANK YOU THANK YOU!!! that worked for me!

Share this post


Link to post
Share on other sites
THANK YOU THANK YOU!!! that worked for me!

 

 

i'v taken care of the first part of it but i'm a little confused with the term configuire update and update sql. if you could please help me with this i would really appricate it. at least point me in the right direction. thanks

Share this post


Link to post
Share on other sites

I thought all went well... :(

 

It seems to work except I now receive this error message when I go into Shipping Modules > United States Postal Service; I wanted to change my handling fee.

Parse error: syntax error, unexpected T_DEC, expecting ')' in /home/handesho/public_html/catalog/admin/modules.php(216) : eval()'d code on line 1

I seen a similar post above so I checked my admin/includes/function/general.php and the stated code was their.

 

I am only using Domestic shipping, USPS is my only shipping module, I upgraded from USPSMethods 2.8d.

I made the edits in the usps.php file for capitalization and updated MySQL.

 

Any ideas as to what I might have missed or overlooked?

 

Or was I incorrect to assume I only needed to make the php file and MySQL edit coming from version 2.8d?

Do I need to backtrack and check all the files in the contribution?

 

:unsure:


- :: Jim :: -

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

Share this post


Link to post
Share on other sites
I thought all went well... :(

 

It seems to work except I now receive this error message when I go into Shipping Modules > United States Postal Service; I wanted to change my handling fee.

Parse error: syntax error, unexpected T_DEC, expecting ')' in /home/handesho/public_html/catalog/admin/modules.php(216) : eval()'d code on line 1

I seen a similar post above so I checked my admin/includes/function/general.php and the stated code was their.

 

I am only using Domestic shipping, USPS is my only shipping module, I upgraded from USPSMethods 2.8d.

I made the edits in the usps.php file for capitalization and updated MySQL.

 

Any ideas as to what I might have missed or overlooked?

 

Or was I incorrect to assume I only needed to make the php file and MySQL edit coming from version 2.8d?

Do I need to backtrack and check all the files in the contribution?

 

:unsure:

 

 

a guess here...

 

 

make sure you dont have an old module in the directory or extra files the modules directory

 

like did you rename the old one uspsmethods.bak or something?

 

modules.php looks for all files in the directory and having an extra one will produce that error.

Share this post


Link to post
Share on other sites

Thank you Joe for a quick reply and taking a crack at my problem.

 

No I did not rename the old file and there are no extra files in the modules folder. I spotted a previous post with that renaming issue so planned ahead... so I thought.

 

Maybe I'm looking at the wrong thing? But could there now be an error in my admin > modules.php file?

I'm not sure if the error message is referencing Line 216 of the modules.php file but here it is if that helps any?

 

if ($value['set_function']) {

eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");

} else {

$keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);

Edited by jhande

- :: Jim :: -

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

Share this post


Link to post
Share on other sites

Jim

 

Did you change the field length as described earlier in this post?


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites
Jim

 

Did you change the field length as described earlier in this post?

 

Oh oh... :blink: :blush:

 

I'll have to look for that.

I edited the usps.php file as noted for the captialization changes and then ran the sql query to update the configuration table (database).

 

I guess I did missing something... thanks Geoffrey I'll start searching for that "how-to". ;)

Edited by jhande

- :: Jim :: -

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

Share this post


Link to post
Share on other sites
its on page 4!!

 

:)

 

Thanks Joe, got it fixed... :thumbsup:

 

My bad, I didn't notice that my International option check boxes weren't there either... DUH :blush:

 

This is what fixed it -

"to get the international boxes to display all you have to do is goto myphpadmin editor or whatever you use to edit your database and change the set function from (255) to text"

Plus, I ran the SQL update again.

 

Check boxes are back and error message is gone.

 

I want to thank everyone for their help! It truely appreciated... :thumbsup:

 

One other thing has had me stumped for some time now.

Even though it has been checked in the Admin Panel, transit times never appear anywhere.

Is that just a non-functioning feature?


- :: Jim :: -

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

Share this post


Link to post
Share on other sites

hi

 

i dont know what made this problem

 

my members are selecting priority shipping from shipping method (i have 4 they can pick from which are express shipping, priority shipping, parcel shipping and international shipping)

 

my members are selecting priority shipping or parcel shipping and click to go to the next page and then the shipping that is actually selected is Express shipping no matter what.

 

i dont know why the system is selecting express shipping when the member selected a different shipping method? what could be wrong?

 

 

thanks

Share this post


Link to post
Share on other sites
hi

 

i dont know what made this problem

 

my members are selecting priority shipping from shipping method (i have 4 they can pick from which are express shipping, priority shipping, parcel shipping and international shipping)

 

my members are selecting priority shipping or parcel shipping and click to go to the next page and then the shipping that is actually selected is Express shipping no matter what.

 

i dont know why the system is selecting express shipping when the member selected a different shipping method? what could be wrong?

thanks

 

mine was doing this before i applied ANY of the updates!!

 

what updates did you apply so far?

Edited by drex

Share this post


Link to post
Share on other sites
mine was doing this before i applied ANY of the updates!!

 

what updates did you apply so far?

 

 

oh i had not read the previous posts , stupid of me! i had to do the upgrade in my database. i did that , and new usps info shows in admin side, but in user side when going to checkout i get this error:

 

An error occured with the USPS shipping calculations.

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

Share this post


Link to post
Share on other sites

^^^ DISREGARD!

 

I entered the wrong username and password thats why i got that error!!! :blush:

 

all working now thanks allot everyone for all your help!

Share this post


Link to post
Share on other sites
my members are selecting priority shipping or parcel shipping and click to go to the next page and then the shipping that is actually selected is Express shipping no matter what.

 

i dont know why the system is selecting express shipping when the member selected a different shipping method? what could be wrong?

thanks

 

I'm having this same issue. I have reinstalled the module from scratch - multiple times. I have read every link that has been posted, and tried every fix. I have changed the set_function to text.

 

Nothing makes a difference. If I have parcel, express, and priority selected to be available, it doesn't matter what the customer chooses, on the last page it reverts to express.

 

If I remove express as an option ... then it goes to priority or whatever option is the most expensive.

 

It's driving me nutty. :(

 

Any ideas? And yes, everything is capped that should be capped.

Share this post


Link to post
Share on other sites

WHAT IS THE SQL QUERY TO ADD THE USPS SHIPPING TYPES TO CONFIGURATION TABLE??? I'M TIRED, IT'S NOW 4+ DAYS OF THIS NONSENSE, I'M TIRED OF CLICKING THROUGH POST AFTER POST AND PIECES OF INFORMATION - WHAT WOULD HAVE BEEN WISE, ESP. FOR THE SMARTASSES WHO WANT YOU TO READ ALL THEIR BULL, IS THE LATEST FIX W/**FULL** SQL QUERY IN THE CONTRIBUTION. INSTEAD I ONLY SEE THE QUERY TO UPDATE SOMETHING THAT DOESN'T EXIST AT ALL IN MY ORIGINAL DATABASE SETUP.

 

INSTEAD I NOW HAVE TO PIECE TOGETHER FROM THE .php FILE AND PIECES OF INFORMATION TO MAKE A QUERY AND HOPE THAT I HAVE ADDED THE RIGHT TITLE, VALUE, ETC. TO PLEASE THE ALL KNOWING GODS HERE!!!!!!!!

 

IN THE MEANTIME, I GUESS I'LL BROWSE THE CORPORATE SPONSOR LIST....HMMMMM

Edited by makeit4me

Share this post


Link to post
Share on other sites
WHAT IS THE SQL QUERY TO ADD THE USPS SHIPPING TYPES TO CONFIGURATION TABLE??? I'M TIRED, IT'S NOW 4+ DAYS OF THIS NONSENSE, I'M TIRED OF CLICKING THROUGH POST AFTER POST AND PIECES OF INFORMATION - WHAT WOULD HAVE BEEN WISE, ESP. FOR THE SMARTASSES WHO WANT YOU TO READ ALL THEIR BULL, IS THE LATEST FIX W/**FULL** SQL QUERY IN THE CONTRIBUTION. INSTEAD I ONLY SEE THE QUERY TO UPDATE SOMETHING THAT DOESN'T EXIST AT ALL IN MY ORIGINAL DATABASE SETUP.

 

INSTEAD I NOW HAVE TO PIECE TOGETHER FROM THE .php FILE AND PIECES OF INFORMATION TO MAKE A QUERY AND HOPE THAT I HAVE ADDED THE RIGHT TITLE, VALUE, ETC. TO PLEASE THE ALL KNOWING GODS HERE!!!!!!!!

CAN YOU STOP SHOUTING AND WHINING? Thanks. The sql update refers to the contribution USPS Methods which is the usps module from osC with changes to be able not to offer certain shipping methods that USPS offers.

 

Your problem has nothing to do with the changes made by USPS (capitalization problem) because you don't even get rates returned from USPS.

Share this post


Link to post
Share on other sites
CAN YOU STOP SHOUTING AND WHINING? Thanks. The sql update refers to the contribution USPS Methods which is the usps module from osC with changes to be able not to offer certain shipping methods that USPS offers.

 

Your problem has nothing to do with the changes made by USPS (capitalization problem) because you don't even get rates returned from USPS.

 

WHY IS YOUR SOFTWARE NOT WORKING AFTER INSTALLATION?????????????????????? YOU GUYS ARE SOOOOOOOOOOOOOOOOOOOOO WISE. WHY IS IT NOT WORKING AFTER INSTALLATION?????????????????????????????????????????????????????????????????????????????????????/

Share this post


Link to post
Share on other sites
CAN YOU STOP SHOUTING AND WHINING? Thanks. The sql update refers to the contribution USPS Methods which is the usps module from osC with changes to be able not to offer certain shipping methods that USPS offers.

 

Your problem has nothing to do with the changes made by USPS (capitalization problem) because you don't even get rates returned from USPS.

 

THAT FIX DID NOT WORK. I REPEATTTTTTTTTTTTTTTTTTTTTTTT:::::: THAT FIX DID NOT WORKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

KKKKKKKKKKKKKKKKKK

 

I REPEAT AGAIN: THAT FIX DID NOT WORKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

 

I'M STILL GETTING THE SAME ORIGINAL ERROR: ERROR.....USPS SHIPPING CALCULATIONSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

 

 

I DOWNLOADED AND SETUP RC1 YESTERDAY - DIDN'T WORK

ADDED YOUR SUPPOSED FIX - DIDN'T WORK

 

IS THERE SOME ALL KNOWING FILE THAT I'M SUPPOSED TO FIND AND READ TOO????????????????????????????????//

Share this post


Link to post
Share on other sites

hehe. I'm entertained now. You are charming.

 

FYI - your mommy is not here. You may want to sign up with a new user name and try a different tactic.

 

Good luck!

 

P.S. - what's your store URL?

 

J

Share this post


Link to post
Share on other sites
hehe. I'm entertained now. You are charming.

 

FYI - your mommy is not here. You may want to sign up with a new user name and try a different tactic.

 

Good luck!

 

P.S. - what's your store URL?

 

J

 

:huh: :huh: :lol: :lol: :lol: :lol:

Share this post


Link to post
Share on other sites

FWIW, I'm having a similar problem with a Store Pickup Module I'm working on - if you build a print_r($shipping) into the checkout confirmation you will probably see that the id for the shipping method is correct, but the retrieval goes wrong - this is what I get:

 

Array

(

[id] => module_TheRightThing

[title] => ModuleName (The Wrong Thing)

[cost] => 0.00

)

 

If I'm correct, this is assigned in checkout_shipping.php by

 

			  $shipping = array('id' => $shipping,
							'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
							'cost' => $quote[0]['methods'][0]['cost']);

 

Have not figured out what goes wrong, but maybe this points someone in the right direction. Or if I'm totally off base, let me know that too... ;)


Even at a Mensa convention someone is the dumbest person in the room.

Share this post


Link to post
Share on other sites

UPDATE: Can't be totally off base, since it works the way its supposed to if I filter the problem module and circumvent the code above with a simple if clause. Its not pretty or safe, so I'm not recommending it - but the fact that it works tells me that the retrieval from the shipping array is what goes wrong. Since it grabs the right id, but the wrong title and cost. I have the strange feeling it may be in one of the [0], but I have not finished thinking that through and have a meeting with a client shortly. More later ...


Even at a Mensa convention someone is the dumbest person in the room.

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
Sign in to follow this  

×