Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS v1.0.3 UPDATE and AJAX ERROR


Chadduck

Recommended Posts

In reviewing "My Library" in the App Shop I saw that this module had been updated.  I clicked the UPDATE button.  The module appeared to install.

When I clicked the "Back" button to return to the "Online" shipping modules I was presented with

DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

I then clicked the BROWSER back arrow, and returned to where the module had installed.  Tried the App BACK button again - SAME ERROR.

I undeployed the module. I then checked shipping modules - SAME ERROR. 

I then redeployed the module - SAME ERROR.

After some trepidation, I flushed these cache items -
System cache
Smarty
Debug
OPcache
Hooks
Themes
Cache for count of products in category

SAME ERROR

Just for funsie I clicked the "Offline" Shipping Modules button - SAME ERROR.

In reviewing the error log discovered this had occured at the time of install

Date: 2023-12-07 13:50:13
IP: 207.115.80.15
Level: error
Category: yii\base\ErrorException:64

yii\base\ErrorException: Cannot declare class common\modules\orderShipping\usps, because the name is already in use in /apache/vhosts/store2/lib/common/modules/orderShipping/v103_usps.php:0
                    Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

Was the App to be removed PRIOR to the updating?  I did not do that as there was no indication of doing so. The only option was update.

How do I resolve this Ajax error.

PRIOR to attempting this update the USPS App was working properly.

BJ

Edited by Chadduck
Link to comment
Share on other sites

RESOLVED

After exhausting two days trying to discover the cause for the AJAX error, the ultimate resolution was to revert to the nightly database back-up of the day before I attempted the installation of the update to USPS v 1.0.3.  Also reverted to the module installed at the time of the back-up which was the v 1.0.1 offered by Vishwa (from another topic posting)

The original  errors above ceased.

After the database restoration, attempted the upgrade yet again with these steps.

Uninstalled the USPS module

Cleared ALL cache items in Cache Control

went to App Shop

located USPS, clicked "greyed out" update

Waited for over 5 minutes - then aborted

Checked Local Storage.

USPS v1.0.3 module was Undeployed

Attempted to Redeploy USPS module

Redployed

Checked Shipping Modules INSTALLED

Edited the module for correct 
USPS User ID
USPS Password
and methods

Returned to Shipping Modules screen

NO PROBLEMS w installation

-- WENT TO FRONT END --

NO First Class shipping (Ground Avantage).

Removed the v1.0.3 installed module

Reverted to previously installed and working v 1.0.1 First Class shipping (Ground Avantage) provided by Vishwa in another topic post.

Edited the module for correct 
USPS User ID
USPS Password
and methods

WORKS correctly with First Class shipping (Ground Avantage).

Hopefully my issue and it's resolution will assist someone else experiencing a similar issue.  Never underestimate having a back-up of the database.

BJ

1 Installed.PNG

2 methods.PNG

3 front end.PNG

4 Reverted Front End.PNG

Link to comment
Share on other sites

  • 2 weeks later...
24 minutes ago, [email protected] said:

I have this version also installed and am not getting it to work

Although this will probably state the obvious, did you enter your USPS ID and PW in the backend? 
Modules > Shipping > United States Postal Service

Did you activate the module?

Did you select a method Ground Advantage, Priority Mail, or Express Mail?

The graphic indicates my basic setup...

Hopefully it will help you.

BJ

USPS.PNG

Link to comment
Share on other sites

So what is concerning is that when this times out, oscommerce allows an order to proceed without any shipping charges whatsoever.  Is this a setting that needs to be changed somewhere?

I only offer USPS shipping and it should be required to place an order.  No offline or other online options have been enabled.

Link to comment
Share on other sites

On 12/19/2023 at 1:45 AM, [email protected] said:

So what is concerning is that when this times out, oscommerce allows an order to proceed without any shipping charges whatsoever.  Is this a setting that needs to be changed somewhere?

I only offer USPS shipping and it should be required to place an order.  No offline or other online options have been enabled.

You have to get this error message if the shipping in not selected:

image.png.7e15b9348093a4f73ba51efddd603c18.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...