Zen Cart Logo
Forums / Addon Shipping Modules / USPS - Cannot install shipping modules anymore

USPS - Cannot install shipping modules anymore

Views: 2,282

Results 1 to 14 of 14
8 Aug 2013, 10:47 PM
#1
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

USPS - Cannot install shipping modules anymore

I tried to update the USPS shipping module and, after I removed the old module, the whole right column for installing/removing modules disappeared. There is nothing on the right side after the "action" arrow.

Any suggestions?

Thanks

8 Aug 2013, 11:19 PM
#2
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

sorry for the typo in the header --- please edit

8 Aug 2013, 11:41 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: USPS - Cannot install shipping modules anymore

There are two files:
/includes/modules/shipping/usps.php (code file)
/includes/languages/englishmodules/shipping/usps.php (language file)

1 make sure you loaded the files to the right directories

2 make sure you do not have a backup or renamed file that might be loading in the auto-loading directory
Good renamed file:
/includes/modules/shipping/usps.php_OLD

Bad renamed file:
/includes/modules/shipping/usps.php.bak
/includes/modules/shipping/uspsOLD.php
/includes/modules/shipping/usps_OLD.php
/includes/modules/shipping/usps.bak.php

8 Aug 2013, 11:52 PM
#4
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

Thanks, Linda - I have figured it out. It was because of extra files in the /shipping directory (I renamed old files to keep them there).

Now the installation works fine, but I have issues of compatibility with 1.3.7:

  1. going to the 1st checkout step, i.e. index.php?main_page=checkout_shipping returns server 500 error.
  2. quick quote popup window is empty.

Is there a version compatible with 1.3.7? I have PHP 5.3.23

Thank you!

9 Aug 2013, 1:09 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: USPS - Cannot install shipping modules anymore

I have not tried this with v1.3.7 and not sure if I even have that out, outdated, buggy and insecure version installed anywhere that it actually is working ...

I will have to look around and see what I find ...

In your Zen Cart Admin ... if you go to Tools ... Server Info ... what do you see between the Menu bar up to and including the reference to your PHP version?

9 Aug 2013, 1:15 AM
#6
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

**Server Host: **xxx.com (xxx.xxx.xxx.xxx) **Database Host: **localhost (127.0.0.1)
**Server OS: **Linux 2.6.18-92.1.13.el5 **Database: **MySQL 5.5.30-cll
**Server Date: **08/08/2013 21:06:03 **Database Date: **08/08/2013 21:06:03
**Server Up Time: **21:06:03 up 178 days, 15:31, 1 user, load average: 0.04, 0.02, 0.00 **PHP Version: **5.3.23 (Zend: 2.3.0) **HTTP Server: **Apache

[TABLE="width: 600"]

Zen Cart 1.3.7

Database Patch Level: 1.3.7

v1.3.7 [2007-04-11 18:51:25] (Fresh Installation)

[/TD]
[/TR]
[/TABLE]

9 Aug 2013, 1:28 AM
#7
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

This is the previous USPS version which has been working fine:
/**

  • USPS Module for Zen Cart v1.3.x - v1.6
  • RateV3 Updates to: January 27, 2013 Version G for CURL
  • @package shippingMethod
  • @copyright Copyright 2003-2013 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: usps.php 18348G 2013-01-27 01:27:00Z ajeh $
    */
9 Aug 2013, 1:49 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: USPS - Cannot install shipping modules anymore

The is a new USPS July 28, 2013 J5 version that has been released ...
http://www.zen-cart.com/downloads.php?do=file&id=1292

I am not sure what you may need to adapt in the file, if anything ...

9 Aug 2013, 2:15 AM
#9
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

Yes, I am trying the same version of Jul 28. Some more details:

  1. If i use an international shipping address, it works fine.
  2. if I switch to an US address, it generates error 500 on

index.php?main_page=checkout_shipping

and doesn't show anything in the shipping estimate pop-up window.

Any suggestions?

Thanks!

9 Aug 2013, 2:33 AM
#10
ajeh avatar

ajeh

Oba-san

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

Re: USPS - Cannot install shipping modules anymore

You may need to edit the file:
/includes/modules/shipping/usps.php

and change this line:

class usps extends base {

to read:

class usps {

I do not believe you have to change this line:

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

but if you do, try using:

  function usps() { // for older php < 5.1.0 change to usps() instead of __construct()
9 Aug 2013, 4:52 AM
#11
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

Thank you, but it is still the same.... error 500 on domestic shipments. Actually, the old working code contains:

class usps extends base {

and

  function usps() {

no function __construct() references.

Any suggestions? I would really hate to start debugging it line-by-line....

9 Aug 2013, 7:33 PM
#12
craigkendall avatar

craigkendall

New Zenner

Join Date:
May 2007
Posts:
46
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

andy1234:

Yes, I am trying the same version of Jul 28. Some more details:

  1. If i use an international shipping address, it works fine.
  2. if I switch to an US address, it generates error 500 on

index.php?main_page=checkout_shipping

and doesn't show anything in the shipping estimate pop-up window.

Any suggestions?

Thanks!

I can verify on a 1.3.7 I have running (client has been putting off upgrade in spite of encouragement to do so, but I'm working on that now) that I too am experiencing international addresses working fine when logged in and choosing an international address on both the cart page and the checkout page where you choose shipping options.
I am not getting a 500 when switching to a US address, but I am also not getting any shipping options displayed on the cart page and pressing continue to go to choose a shipping option just seems to refresh the screen you are on. Switching to an international address will allow you to advance and presents shipping options.
I can also verify that, when not logged in am getting no shipping options on the cart page after entering state/zip for US but switching to an international address I am presented with shipping options.

So, it appears the glitch, whatever it is, relates to the US side of the application.

I'm proceeding with the update to 1.5.1 (we have some custom code features that we have to ensure don't "break" the store when we plug them into the new version so it's been tedious) but knowing it may take a while would really like to have a solution for this if anyone figures it out so client can start processing US orders again.

======= SERVER AND VERSION INFO =======

Server Information
**Server Host: **ps116272 (##.##.##.##) **Database Host: **mysql.##########.com (##.##.##.##)
**Server OS: **Linux 3.1.9-vs2.3.2.5 **Database: **MySQL 5.1.39-log
**Server Date: **09/08/2013 12:32:02 **Database Date: **09/08/2013 12:32:02
**Server Up Time: ** **PHP Version: **5.2.17 (Zend: 2.2.0) **HTTP Server: **Apache

Zen Cart 1.3.7

Patch: 1::

Database Patch Level: 1.3.7

v1.3.7 [2007-12-28 09:07:30] (Fresh Installation)

20 Aug 2013, 7:17 AM
#13
andy1234 avatar

andy1234

Zen Follower

Join Date:
Oct 2006
Posts:
148
Plugin Contributions:
0

Re: USPS - Cannot install shipping modules anymore

Finally, I've managed to resolve it:

  1. in the /includes/modules/shipping/usps.php, find the function function zen_usps_shipdate() (approx 1598 line)

  2. Override the PHP version compare, to get back to older versions. I simply changed it to

if (version_compare(PHP_VERSION, 15.2, '>=')) {

That's it. The problem is with date/time functions of php 5.3.

20 Aug 2013, 11:43 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: USPS - Cannot install shipping modules anymore

So that probably means your PHP 5.3 isn't fully configured properly with a timezone. You'll want to fix that. Your host can help you set the php.ini correctly.

Further, ZC v1.3.7 was released in 2006, at a time when PHP 5.3 hadn't even been conceived of yet. There are tons of incompatibilities.
If you intend to keep using the modern PHP version, you'll need to also use a modern ZC version.

I know you said you're considering upgrading. I'm mentioning this so you don't treat it casually.