Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Views: 4,058

Results 1 to 20 of 30
1 Apr 2015, 12:35 PM
#1
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

So since we all have to upgrade our USPS built in shipping module to "USPS_2014_1030_K6", I began this process last week with no luck.

When I remove the old module via the admin backend and then delete the files on the server as instructed, the module disappears from the admin modules view. Perfect. Then when I choose to add in the new version module, instead it somehow retains all my old info (despite me deleting the two files as instructed). Further, the module name and type fields in the module list show up as blank.

I have removed the files from my server several times and get the same result each time I upload the new version files.

For some reason I feel like this has happened to me in the past, perhaps the last time I updated the USPS shipping module, but I cannot remember how I got it resolved.

I have attached a screenshot of my admin modules screen so you can see what I see.

Thanks in advance for any help that can be given.

Attachment #15116

Fretty
https://www.universal-heros.com

1 Apr 2015, 3:15 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

To make sure you get a clean delete of all records ... go to phpMyAdmin and find your database, then run the SQL:

delete from configuration where configuration_key like 'MODULE\_SHIPPING\_USPS\_%'

Next, go you your Zen Cart Admin and go to Modules ... Shipping ...
NOTE: make sure you do this fresh, as if you had never been there

Do you now see the USPS shipping module name listed, just like all the other shipping modules have their names listed?

2 Apr 2015, 12:11 PM
#3
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Hi Ajeh,

Thanks for the quick reply!

Unfortunately it didn't work. It now looks like the below screenshot.
I deleted the two module files first, then ran the SQL command as instructed and then logged back into the admin and when I went to the shipping modules section everything was still blank. This time when I choose "install", nothing happens at all. So at least it is wiping my previous settings now, but it still won't recognize/install it correctly.

Attachment #15118

Fretty
https://www.universal-heros.com

2 Apr 2015, 1:16 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

If you go to your Zen Cart Admin to the Tools ... Developers Tool Kit ...

and in the bottom input line enter:
usps.php

and select Catalog and click search ... what comes up on the screen showing the line numbers, file names and text that is found?

2 Apr 2015, 1:54 PM
#5
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Here is a screenshot of the result:

Attachment #15119

Now this is after I tried the last suggestion and still have those new version files uploaded to my server.
If you want, I can delete those files and run the SQL command again and then try this search again after that.
Let me know.

Fretty

2 Apr 2015, 2:07 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Try deleting the two files then run that SQL on your database ...

Next, go to the Modules ... Shipping ... and ensure that nothing is there with the blank line ...

Next, try to reload the 2 files for the USPS shipping module and then go to the Modules ... Shipping ... and see if the USPS name is now showing ...

2 Apr 2015, 2:31 PM
#7
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

After deleting the files and running the SQL command (this time 0 rows affected), the module (blank line) disappeared. As soon as I uploaded the new files again, the module reappeared as a blank line again.

Perhaps it is something with my upload?

Fretty
https://www.universal-heros.com

2 Apr 2015, 2:43 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Do this in steps ...

1 go to phpMyAdmin and make sure you have the right database selected and run the SQL to delete things related to USPS shipping module

2 Delete the files on the server:
/includes/modules/shipping/usps.php
/includes/languages/english/modules/shipping/usps.php

and while looking at that directory, ensure there are no traces of usps.php files that are renames, .bak, etc.

3 go to Zen Cart Admin and to the Modules ... Shipping ... and ensure that USPS is not there and neither is the blank line

4 go to phpMyAdmin and run the SQL:
SELECT * FROM configuration WHERE configuration_key LIKE 'MODULE_SHIPPING_INSTALLED';

what comes up for the field:
configuration_key

3 Apr 2015, 3:08 PM
#9
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

After doing all of this, here was the result of the final SQL search query:

configuration_key: "MODULE_SHIPPING_INSTALLED"
configuration_value: "flat.php;freeoptions.php;freeshipper.php;item.php;storepickup.php;upsxml.php"

I do not see any traces of usps.php in the results.

Fretty
https://www.universal-heros.com

3 Apr 2015, 3:14 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Is that space in the configuration_key or is that just a typo/wrap on

configuration_value: "flat.php;freeoptions.php;freeshipper.php;item.php;storepickup.php;upsxml.ph p"

3 Apr 2015, 3:17 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

And since USPS should not be installed yet, if you run this SQL in phpMyAdmin:

SELECT * FROM configuration WHERE configuration_key LIKE '%MODULE_SHIPPING_USPS%';

You should not find anything, correct?

8 Apr 2015, 2:15 PM
#12
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Ajeh:

Is that space in the configuration_key or is that just a typo/wrap on

That was just a copy/paste error. There is no space in the actual value.

8 Apr 2015, 2:16 PM
#13
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Ajeh:

And since USPS should not be installed yet, if you run this SQL in phpMyAdmin:

SELECT * FROM configuration WHERE configuration_key LIKE '%MODULE_SHIPPING_USPS%';

> 
> You should not find anything, correct?


That is correct.  I got no result from that query.
"*MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0029 sec )*"
8 Apr 2015, 2:25 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Without trying to install the USPS shipping module ... if you go to the Modules ... Shipping ... in your Zen Cart Admin, what are you seeing now on the listing?

If you click on the USPS shipping module, but do not try to install it, what do you see in the right hand panel?

If you click on the Flat shipping module, what do you see in the right hand panel?

8 Apr 2015, 2:40 PM
#15
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

When going to admin > shipping modules after doing all of this and not having the files on my server, I see nothing relating to USPS nor any blank lines.

Once I upload the files to my server to their appropriate directories and I refresh the admin > shipping modules screen, I now see the blank line reappear. When I click on the blank line, the right hand side shows only an "Install" button, but nothing else. No text or anything.

When I click on the Flat Rate shipping module, I see all my settings come up on the right hand side as per usual.

Fretty
https://www.universal-heros.com

13 May 2015, 12:27 PM
#16
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

Sorry to be a bother, but I'm still stuck on this issue.
Any other ideas / suggestions?

Could it possible be the way I am uploading the file to the server? Perhaps an option I have turned on or off?

Without getting this to work, I have no way to sell items on my website.
I'm planning to rebuild our entire site anyways, but I'd love this to be working in the meantime as that won't exactly be a quick thing. :)

Thanks again.

13 May 2015, 12:59 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

This is quite bizarre ...

What version of php are you using?

13 May 2015, 1:16 PM
#18
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

PHP version 4.4.9

13 May 2015, 1:28 PM
#19
ajeh avatar

ajeh

Oba-san

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

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

You have an ancient php which also should be upgraded to something current like php 5.4 or php 5.5, but then you have to upgrade your Zen Cart ...

Try this, around line 84 in:
/includes/modules/shipping/usps.php

Edit the line that reads:

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

and, as instructed, change it to read:

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

Does this correct the problem?

13 May 2015, 1:44 PM
#20
fretty avatar

fretty

New Zenner

Join Date:
Sep 2010
Posts:
59
Plugin Contributions:
0

Re: USPS Shipping Module Won't Uninstall/Reinstall Properly for Upgrading Purposes

I made the edit as suggested and sure enough the module showed up in the shipping modules screen. After I hit install though, I have lost the right hand side bar of the shipping modules screen for some reason and now the USPS module isn't show in the list. I checked the other modules (payment, order total) and they are just fine.

Any ideas?

Attachment #15293