Zen Cart Logo
Forums / Addon Shipping Modules / USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Views: 7,391

Results 21 to 38 of 38
5 Mar 2014, 6:54 PM
#21
drbyte avatar

drbyte

Sensei

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

USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Please list all the files in your /includes/languages/english/modules/shipping folder.

5 Mar 2014, 8:13 PM
#22
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

/includes/languages/english/modules/shipping

classic (folder)
flat.php
freeoptions.php
freeshipper.php
item.php
perweightunit.php
storepickup.php
table.php
ups.php
upsxml.php
usps.php
zones.php

5 Mar 2014, 8:44 PM
#23
drbyte avatar

drbyte

Sensei

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

When the module shows up unnamed in the left column then that means the language file for that module is empty or contains something other than all the definitions for language values.

If you click Install and all the input fields in the right column have no description, that means the module itself is damaged (file is incomplete, didn't upload properly, etc), or the system is unable to add the settings switches into the database correctly which could mean your database table named "configuration" is damaged and needs repair. You can repair tables using phpMyAdmin, provided by your hosting company, by clicking on that table and choosing the Operations tab, and selecting Repair Table and clicking Go.

Neither Ajeh or I have any old PHP 4 servers to test against anymore. You should consider upgrading PHP and Zen Cart.

6 Mar 2014, 4:47 AM
#24
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Disregard my previous post (the one set to be approved by moderators first). I made a misjudgement in what I thought I saw.

Regardless, below is a paste of the language file as uploaded to the server. Perhaps you can spot something wrong with it?

<?php /** * USPS Module for Zen Cart v1.3.x thru v1.6 * USPS RateV4 Intl RateV2 - January 26, 2014 Updates to: January 26, 2014 Version K * * @package shippingMethod * @copyright Copyright 2003-2014 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @copyright Portions 2012 osCbyJetta * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: usps.php 2014-01-26 ajeh Version K $ */ define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service'); define('MODULE_SHIPPING_USPS_TEXT_SHORT_TITLE', 'USPS'); define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'United States Postal Service<br /><br />You will need to have registered an account with USPS at <https://secure.shippingapis.com/registration/> to use this module<br /><br />USPS expects you to use pounds as weight measure for your products.'); define('MODULE_SHIPPING_USPS_TEXT_TEST_MODE_NOTICE', '<br /><span class="alert">Your account is in TEST MODE. Do not expect to see usable rate quotes until your USPS account is moved to the production server (1-800-344-7779) and you have set the module to production mode in Zen Cart admin.</span>'); define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.<br />If you prefer to use USPS as your shipping method, please contact us for assistance.<br />(Please check that your Zip Code is entered correctly.)'); define('MODULE_SHIPPING_USPS_TEXT_DAY', 'day'); define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'days'); define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'weeks');
6 Mar 2014, 4:54 AM
#25
drbyte avatar

drbyte

Sensei

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

That appears to be syntactically correct as a language file. I won't comment on whether it's the correct one for the latest version, as that's irrelevant right now.

Another thought:
I don't recall reading you saying anything about putting back the old module as a test. Does it suddenly show up correctly if you do?
If it does, will it let you install, then remove it, then install it again?
If so, click Remove to remove it again, and then try again with the newest one.

Do any MyDebug-xxxxxxx.log files show up when you do any of that?

6 Mar 2014, 12:43 PM
#26
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

I tried putting the old module back and everything worked just fine. It showed up instantly, allowed me to install, which I proceeded to do, then I configured it and it all worked fine (aside from the original issue of not obtaining international shipping quotes). At this point, no debug log files were created.

I then removed the module completely and deleted the respective files from the server. Still no debug log files created.

After uploading the new module files to their respective directories, the same issue appears again. The name is blank in the module screen, when I hit "install" nothing happens, etc. At this point, no debug log files have been created.

I click "Install" just to see what happens, and nothing, as before. At this point a debug file IS created with the following:

[06-Mar-2014 07:42:08] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /home/heros/public_html/zen-cart/admin/modules.php on line 282
[06-Mar-2014 07:42:08] PHP Warning: Variable passed to each() is not an array or object in /home/heros/public_html/zen-cart/admin/modules.php on line 283

6 Mar 2014, 12:56 PM
#27
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Maybe you can help me just solve the original issue instead of looking into this one with me?
The original issue is that as of January 2014, International quotes stopped working all together. When I turn on debug mode to see what happens, it 'appears' as though it is getting the information back from the USPS servers, but it just doesn't know what to do with it.

Here is a paste of a portion of the debug output when you try to obtain an international shipping quote:

View Source:
Server: production Weight = 4 Pounds: 4 Ounces: 0 ZipOrigination: 14304 ZipDestination: 50001 Country: Spain Tare Rates - Small/Medium: 0:0 Large: 0:0 RESPONSE FROM USPS:

Arms; ammunition; weapons; parts and components of weapons; and other related equipment. Coins; banknotes; currency notes (paper money); traveler's checks; securities payable to bearer; platinum, gold or silver, manufactured or not; precious stones; jewelry; and other valuable articles except in insured Priority Mail International parcels. Foodstuffs containing saccharine in any amount. Human remains. Live plants and animals. Perishable infectious biological substances. Playing cards. Radioactive materials. Tobacco (admitted only to the Canary Islands, Ceuta, and Melilla).The maximum value of a GXG shipment to SPAIN is $2,499 or a lesser amount if limited by content or value. Used clothing must be accompanied by a certificate of disinfection.1. A parcel may be addressed to a street address or to a post office box. A local telephone number for the addressee should be provided when the item is addressed to a street address and must be provided when the item is addressed to a post office box. 2. For parcels, an invoice, in duplicate, is required for all commercial shipments regardless of value and all personal shipments valued at $300 or more. The invoices must be affixed to the outside of the parcel or may be enclosed in PS Form 2976-E with the customs declaration. 3. Parcel service to the Canary Islands extends to the following offices only: Agaete Arrecife Arucas Galdar Garachico Gran Tarajal Granadilla Guia Guia de Isora Guimar Haria Hermigua Icod Ingenio La Antigua La Cuesta La Laguna La Orotava Las Palmas Los Llanos Moya Puerto Cabras Puerto de la Cruz Puerto Luz Realejo Alto San Andres y Suaces San Bartolome Tirajana San Mateo San Miguel San Sebastian de la Gomera Santa Brigida Santa Cruz de la Palma Santa Cruz de Tenerife Tacoronte Tazacorte Telde Teror Valverde del HierroFirst-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes: PS Form 2976 (see 123.61) Priority Mail International parcels: PS Form 2976-A inside 2976-E (envelope)Country Code: ES Reciprocal Service Name: Postal Express Required Customs Form/Endorsement 1. Business correspondence, commercial papers, and documents. No form required. Endorse item clearly next to mailing label as BUSINESS PAPERS. 2. Merchandise samples without commercial value, microfilm, microfiche, and private letters. PS Form 2976, Customs - CN 22 and Sender's Declaration. 3. Merchandise, advertising materials, and all articles subject to customs duty. PS Form 2976-A, Customs Declaration and Dispatch Note CP 72, inside a PS Form 2976-E, Customs Declaration Envelope CP 91. Note: 1. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to Spain. 2. Priority Mail Express International With Guarantee service - which offers a date-certain, postage-refund guarantee - is available to Spain but not to the Canary Islands. Areas Served: Entire country, including Canary Islands, Balearic Islands, and Andorra.Please reference Express Mail for Areas Served.

40PackageSPAIN101.60 1 - 3 business days to many major marketsGlobal Express Guaranteed<sup>®</sup> (GXG)** Max. length 46", width 35", height 46" and max. length plus girth combined 108" 70

40PackageSPAIN101.60 1 - 3 business days to many major marketsGlobal Express Guaranteed<sup>®</sup> Non-Document Rectangular Max. length 46", width 35", height 46" and max. length plus girth combined 108" 70

40PackageSPAIN101.60 1 - 3 business days to many major marketsGlobal Express Guaranteed<sup>®</sup> Non-Document Non-Rectangular Max. length 46", width 35", height 46" and max. length plus girth combined 108" 70

40PackageSPAIN101.60 1 - 3 business days to many major marketsUSPS GXG<sup>™</sup> Envelopes** USPS-Produced regular size cardboard envelope (12-1/2" x 9-1/2"), the legal-sized cardboard envelope (15" x 9-1/2") and the GXG Tyvek envelope (15-1/2" x 12-1/2") 70

40PackageSPAIN61.90 3 - 5 business days to many major marketsPriority Mail Express International<sup>™</sup> Max. length 60", max. length plus girth combined 108" 66

It goes on like this with many more lines. It looks like it is getting results back for all possible international shipping options.
Now, I have the module configured to ONLY obtain "Priority Mail International" and nothing else, yet it still seems to be receiving it all.

I tested the debug output for a shipping quote just for the United Stated, where I have the module configured to only obtain "Priority" quotes and nothing else, and the debug output shows that it is ONLY receiving that one quote, as requested:

View Source:
Server: production Weight = 4 Pounds: 4 Ounces: 0 ZipOrigination: 14304 ZipDestination: 90210 Tare Rates - Small/Medium: 0:0 Large: 0:0 RESPONSE FROM USPS:

143049021040REGULAR8 Priority Mail 2-Day<sup>™</sup>18.15

View Source:
Server: production Weight = 4 Pounds: 4 Ounces: 0 ZipOrigination: 14304 ZipDestination: 90210 Tare Rates - Small/Medium: 0:0 Large: 0:0 RESPONSE FROM USPS:

143049021040REGULAR8 Priority Mail 2-Day<sup>™</sup>18.15

I am not sure if I am even barking up the right tree when it comes to what to look for, but that's why I'm asking the experts. :)

Thanks.

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

6 Mar 2014, 2:10 PM
#28
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

No promises on getting this old version working either ... the need to upgrade, as DrByte mentioned, really makes things hard ...

First, run this, so we know "what" old version is kinda working ...

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:

Next, edit the USPS module and set the Debug to Logs ...

Test your shipping for Spain and Beverly Hills again ...

Now, Zip the Shipping debug logs that are created in the /cache directory and post them here ...

6 Mar 2014, 2:39 PM
#29
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

The first result:

/home/heros/public_html/zen-cart/includes/languages/english/modules/shipping/usps.php

Line #6 : * @version $Id: usps.php 18348F 2012-01-22 01:22:00Z ajeh $

The second result:

/home/heros/public_html/zen-cart/includes/modules/shipping/usps.php

Line #9 : * @version $Id: usps.php 18348F 2012-01-22 01:22:00Z ajeh $

I have attached the ZIP file as requested.

Thanks again for all your effort. I really appreciate this.

6 Mar 2014, 3:00 PM
#30
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Not gonna happen ...

Let's try an experiment ...

Get the current USPS January 26, 2014 version K1 shipping module ...

BEFORE you load it to the server, edit the line:
/includes/modules/shipping/usps.php

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

Then load it to the server, does the name show?

Do the REMOVE, INSTALL and reconfigure ...

And see if that does the trick ...

NOTE: this does not change the fact that you need to upgrade your php ...

6 Mar 2014, 3:23 PM
#31
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

I'm sorry, I don't completely understand. I found the line you're referring to, but what exactly do you want me to edit in that line? The line in the file is exactly as you have it shown above. Am I missing something?

As for the PHP version on my server; if I were to have that upgrades, would that solve the issue completely? Should I just contact my hosting provider and ask for the upgrade if that will take care of everything?

Fretty

6 Mar 2014, 3:43 PM
#32
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

I'd like you to try following the instructions on that line and edit the file:

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

to read:

  function [B]usps()[/B] { // for older php < 5.1.0 change to usps() instead of __construct()
6 Mar 2014, 3:45 PM
#33
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Fretty:

As for the PHP version on my server; if I were to have that upgrades, would that solve the issue completely? Should I just contact my hosting provider and ask for the upgrade if that will take care of everything?

This will depend on what version of php that they would upgrade you to and whether or not you will have to upgrade your Zen Cart software in order to work with it ... most likely you will need to upgrade your Zen Cart software to work with a newer version of php ...

6 Mar 2014, 4:46 PM
#34
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Oh okay, that makes more sense. I guess I just wasn't reading it right.

So after doing that, it showed up in the modules and I was able to install and configure it. Yay!
However, now when I navigate to my shopping cart on my website, the shipping quote area does not show up. I had my store set to have the shipping quote option built onto the shopping cart page, rather than have it as a pop up. I am not sure if that may be breaking things right now, but either way, nothing shows up on my shopping cart.

Here is the debug file generated when someone navigates to their shopping cart:

[06-Mar-2014 11:36:35] PHP Fatal error: Call to undefined function: htmlspecialchars_decode() in /home/heros/public_html/zen-cart/includes/modules/shipping/usps.php on line 1045

6 Mar 2014, 5:03 PM
#35
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

I am not sure if this will work, but you can try adding a new file to:
/includes/functions/extra_functions

call it:
htmlspecialchars_decode_php4.php

and put in it:

<?php
if ( !function_exists('htmlspecialchars_decode') )
{
    function htmlspecialchars_decode($text)
    {
        return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
    }
}

NOTE: this is a total shot in the dark to see if that can resolve this issue for your php 4

6 Mar 2014, 5:13 PM
#36
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Okay I tried that. Still nothing.
I get this in a debug file now:

[06-Mar-2014 12:10:10] PHP Fatal error: Call to undefined function: simplexml_load_string() in /home/heros/public_html/zen-cart/includes/modules/shipping/usps.php on line 1255

I added the file you recommended, and am still using the change to function usps() from function __construct() in the usps.php file you mentioned earlier. Should I be reverting that back and starting all over since I've added in this new htmlspecialchars_decode_php4.php file, or should I just add that new file without touching the module?

6 Mar 2014, 5:51 PM
#37
ajeh avatar

ajeh

Oba-san

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

I got nothing for the simplexml_load_string() as that is php 5 and I am not finding anything simple for this ...

Unless DrByte or someone has something up their sleeve for this ... I think we are stuck ...

Perhaps it is time to bite the bullet and ask your hosting provider what php version you can upgrade to, such as php 5.2 ...

Also find out what their plans are for when you need to go to php 5.4 ...

This is a good time to consider what it would take to upgrade to Zen Cart v1.5 or Zen Cart v1.5.2 which we hope to be releasing soon ...

6 Mar 2014, 7:59 PM
#38
fretty avatar

fretty

New Zenner

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

Re: USPS Module 2014_0126_K1 Doesn't Have Module Name, Remove Properly or Enable

Yikes, that's unfortunate.
I guess I knew this day would come eventually.

Thanks for all your help, you two, I really appreciate it. The support you have given is unmatched.

For the time being I will be reverting back to the old module, just so I can at least allow the website to take orders for all of North America.

Thanks again.