Forums / Addon Shipping Modules / Problems With Installation of New USPS Shipping Module

Problems With Installation of New USPS Shipping Module

Locked
Results 1 to 20 of 24
This thread is locked. New replies are disabled.
25 Jun 2014, 00:02
#1
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Problems With Installation of New USPS Shipping Module

Attempting to update USPS shipping Module. No shipping methods/rates at all.

1.) Removed/Deleted old USPS shipping module according to instructions. Even applied for and received a new Web Tools User ID.
2.) Downloaded, unzipped and uploaded new USPS data to server in proper locations. Developers Tool Kit shows:

/web/store/includes/languages/english/modules/shipping/usps.php

Line #12 : * @version $Id: usps.php 2014-03-07 ajeh Version K3 $

3.) Configured all choices according to my needs.

3.) Installed new module and in the "SHIPPING MODULES" there is no "United States Postal Service" or "usps" in the place it was.

Attachment 14202
25 Jun 2014, 01:28
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

You should have two files:
/includes/modules/shipping/usps.php
/includes/languages/english/modules/shipping/usps.php

Also, check that you have loaded the code file to:
/includes/modules/shipping/usps.php

and the language defines to:
/includes/languages/english/modules/shipping/usps.php
25 Jun 2014, 12:26
#3
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Both files were uploaded to the proper directories. The installation looks like its there but seems fragmented because "United States Postal Service and "usps" aren't appearing in the "Shipping Modules area of ZC. The Module can be edited when you click on the blank line but its like ZC doesn't recognize the module is there at checkout because it's not "named." If that makes any sense.
25 Jun 2014, 13:30
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

Are you getting any debug logs in the /cache directory?

You say you are using v139b ... I do not know if that version has issues vs v139h ... so far I cannot reproduce this in v139h ...

Try deleting the language file on the server:
/includes/languages/english/modules/shipping/usps.php

and reload the language file ...

One more time, do the test for the files ...

Go to your Zen Cart Admin and go to Tools ... Developers Tool Kit ...

In the bottom input box enter:
usps.php

Then, select Catalog ... click SEARCH ...

What comes up on the lines for:
* @version $Id: usps.php

You should get two files listed ...

Next, go to Modules ... Shipping ... and do a REMOVE, INSTALL and reconfigure of USPS ... any change?
25 Jun 2014, 14:15
#5
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

I re loaded the files to the server this morning in both locations. Checked the Developers Tool Kit search just now and get this:

/web/store/includes/languages/english/modules/shipping/usps.php

Line #12 : * @version $Id: usps.php 2014-03-07 ajeh Version K3 $

I have tried to remove the module in ZC but it won't let me. I think its got something to do with the "blank" area to the left. See screen shot - I marked in RED, the missing area:

Attachment 14203
25 Jun 2014, 14:34
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

I still am not sure why you do not find two files when you do that search ...

Go to Tools ... Install SQL Patches ... and run:
delete from configuration where configuration_key like 'MODULE\_SHIPPING\_USPS\_%';


That should remove the USPS shipping module from the configuration table ...

Check now on Modules ... Shipping ... is the blank area for the module still blank? If you click on it, does it show as installed or needing to be installed?
25 Jun 2014, 14:51
#7
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Ran the code. Looks like it removed the module but the area for the module is still blank with only the "INSTALL" button showing to the right.
25 Jun 2014, 14:55
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

And you still find no debug logs in the /cache directory, correct?
25 Jun 2014, 15:01
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

Edit the file:

/includes/modules/shipping/usps.php

and find the line:
  function __construct() { // for older php < 5.1.0 change to usps() instead of __construct()


Change that to read:
  function usps() { // for older php < 5.1.0 change to usps() instead of __construct()


Does it work?

What version of php are you using?
25 Jun 2014, 15:03
#10
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Yes, here are three out of ten from yesterday:

[24-Jun-2014 14:49:50] PHP Fatal error: Cannot redeclare class usps in /web/store/includes/modules/shipping/usps.php on line 20

[24-Jun-2014 14:33:32] PHP Parse error: syntax error, unexpected ';' in /web/store/includes/languages/english/shopping_cart.php on line 13

[24-Jun-2014 14:50:11] PHP Fatal error: Cannot redeclare class usps in /web/store/includes/modules/shipping/usps.php on line 20
25 Jun 2014, 15:18
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Problems With Installation of New USPS Shipping Module

bswarren:

Yes, here are three out of ten from yesterday:

[24-Jun-2014 14:49:50] PHP Fatal error: Cannot redeclare class usps in /web/store/includes/modules/shipping/usps.php on line 20

[24-Jun-2014 14:33:32] PHP Parse error: syntax error, unexpected ';' in /web/store/includes/languages/english/shopping_cart.php on line 13

[24-Jun-2014 14:50:11] PHP Fatal error: Cannot redeclare class usps in /web/store/includes/modules/shipping/usps.php on line 20

It looks like you've got two issues:
1) The parse error in /includes/languages/english/shopping_cart.php (separate fix)
2) You've renamed your old USPS shipping module to something like usps_older_version.php instead of something like usps.php.older_version. Zen Cart loads all files that have a .php extension from /includes/modules/shipping, that's why you're getting the class redeclaration error.
25 Jun 2014, 15:19
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

Could you also check that you do not have any old, renamed usps.php files such as usps.fred.php or oldusps.php or .bak files etc in the the directory on the server for:
/includes/modules/shipping
25 Jun 2014, 15:23
#13
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Changed code as per your instructions and it put the wording back into the blank space.

function usps() { // for older php < 5.1.0 change to usps() instead of __construct()

I'll try a re-install now.
25 Jun 2014, 15:30
#14
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Re-install was successful, blank area filled. Tried going through order process and get a blank window when I click on get shipping estimate. I think we're making progress however.
25 Jun 2014, 15:34
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

Did you check for extra files in your directory:
/includes/modules/shipping

to ensure that there are no duplicate loading of the files?

Can you check the /cache directory and refresh it to see if there are any new debug logs generated? If so, what are their contents?
25 Jun 2014, 15:40
#16
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

lat9:

It looks like you've got two issues:
1) The parse error in /includes/languages/english/shopping_cart.php (separate fix)
2) You've renamed your old USPS shipping module to something like usps_older_version.php instead of something like usps.php.older_version. Zen Cart loads all files that have a .php extension from /includes/modules/shipping, that's why you're getting the class redeclaration error.


I don't see any files like that in /includes/modules/shipping. I only see the modules that appear in ZC.
25 Jun 2014, 15:42
#17
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Ajeh:

Did you check for extra files in your directory:
/includes/modules/shipping

to ensure that there are no duplicate loading of the files?

Can you check the /cache directory and refresh it to see if there are any new debug logs generated? If so, what are their contents?



YES:
[25-Jun-2014 11:28:27] PHP Fatal error: Call to undefined function: simplexml_load_string() in /web/store/includes/modules/shipping/usps.php on line 1351

[25-Jun-2014 11:33:42] PHP Fatal error: Call to undefined function: simplexml_load_string() in /web/store/includes/modules/shipping/usps.php on line 1351
25 Jun 2014, 15:59
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Problems With Installation of New USPS Shipping Module

Could you go to Tools ... Server Info ... and post what you see from the menu down to and including the php version please?
25 Jun 2014, 16:05
#19
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Ajeh:

Could you go to Tools ... Server Info ... and post what you see from the menu down to and including the php version please?


Server Information
Server Host:
Server OS: SunOS 5.10 Database: MySQL 4.1.22
Server Date: 06/25/2014 12:04:09 Database Date: 06/25/2014 12:02:53
Server Up Time: up ??:?? load: 0.00 0.00 0.00 HTTP Server: ConcentricHost-Ashurbanipal/1.8 (Concentric(R))
PHP Version: 4.4.8 (Zend: 1.3.0) PHP Safe Mode: Off
PHP File Uploads: On Max Size: 2M POST Max Size: 8M
Database Data Size: 14,366 kB Database Index Size: 3,256 kB
25 Jun 2014, 16:23
#20
bswarren avatar

bswarren

New Zenner

Join Date:
Oct 2010
Posts:
23
Plugin Contributions:
0

Re: Problems With Installation of New USPS Shipping Module

Screen shot showing no other or renamed usps.php files:

Attachment 14204