Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error with UPS XML Modeule


Guest

Recommended Posts

Ok, just installed the UPS XML module, from my admin end though when I apply any changes to the UPS Shipping module, I am getting this error:

"Couldn't find constant UPSXML_Array in /home/mountain/public_html/catalog/includes/modules/shipping/upsxml.php on line 1043"

 

Any suggestions?

Link to comment
Share on other sites

How about reading the install instructions that came with the module? The error is mentioned in there (plus the support thread for this contribution which you also missed).

 

>_<

 

Thank you so much for your tactfulness. Yes, I did read the install instructions of which I am assuming that you refer to this:

*****************************************

Find This code somewhere around line 48:

*****************************************

 

if (tep_not_null($action)) {

switch ($action) {

case 'save':

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

***********************************************

INSERT THE FOLLOWING CODE AFTER THE ABOVE LINE:

***********************************************

 

if (is_array($value) ) {

$value = implode( ", ", $value);

$value = ereg_replace (", --none--", "", $value);

}

 

****************************

SO IT SHOULD LOOK LIKE THIS:

****************************

 

if (tep_not_null($action)) {

switch ($action) {

case 'save':

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

if (is_array($value) ) {

$value = implode( ", ", $value);

$value = ereg_replace (", --none--", "", $value);

}

tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");

}

tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));

break;

case 'install':

 

 

NOTE1: if you fail to do this step you will get the following error message when editing UPS XML in the admin:

 

Warning: constant() [function.constant]: Couldn't find constant UPSXML_Array in /path/to/your/shop_root/includes/modules/shipping/upsxml.php on line 1010

 

Yes, I did make those changes, as well as the others mentioned in the install directions.

 

:rolleyes:

Link to comment
Share on other sites

Excellent, than going back in the admin, excluding some methods and saving the settings should get rid of the error.

 

 

Well.....eliminated them one by one until only UPS Ground was left.....still same error.

Link to comment
Share on other sites

Well.....eliminated them one by one until only UPS Ground was left.....still same error.

Then I really think something went wrong when you edited the file admin/modules.php. The file does not split up the post array of methods that should be disallowed so they are just "reported" as Array and then end up as UPSXML_Array in the database.

Perhaps something went wrong with ftp-ing the file?

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...