Jump to content
torinwalker

New UPS XML Shipping Module available

Recommended Posts

You could probably do that using the zones stuff in osC and excluding Canada from the rest of the world as a zone. I don't know how that works in the admin, but this is the piece of code that is in every shipping module that controls if a shipping module is loaded or not depending on the zone (around line 110 in the upsxml.php file).

		if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {
		$check_flag = false;
		$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPSXML_RATES_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
		while ($check = tep_db_fetch_array($check_query)) {
			if ($check['zone_id'] < 1) {
				$check_flag = true;
				break;
			} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
				$check_flag = true;
				break;
			}
		}
		if ($check_flag == false) {
			$this->enabled = false;
		}
	}

As you will notice there is the variable $check_flag that is set to false in the beginning and then a check is done on the zone and $order->delivery['zone_id']. Canada has 38 as a countries_id so I assume you can figure out what I want to point out.

 

 

I did you first suggestion yesterday already after finding a post talking about using tax zones as zones. So I suppose that will work for now until I can find a better way of doing it. I would feel more comfortable doing it in the code you show here. Thank you:)

Share this post


Link to post
Share on other sites

I have installed UPSXML and gotten it working except that in the Admin edit, the Disallowed Shipping Methods heading is there but there are no choices under it to select.

 

When doing a test order in the store the shipping options are:

 

UPS Ground

UPS 3 Day Select

UPS 2nd Day Air

UPS Next Day Air Saver

UPS Next Day Air Early A.M.

UPS Next Day Air

 

I did follow these instructions...

Step 2

In catalog/includes/modules/shipping/upsxml.php (about line 291)

Find the key MODULE_SHIPPING_UPSXML_TYPES

and remove several of the shipping methods listed there to reduce the field to

less than 255 characters

 

here's what I did: (on line 429):

 

        tep_db_query("insert into " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key,
configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values
('Disallowed Shipping Methods', 'MODULE_SHIPPING_UPSXML_TYPES', '', 'Select the UPS services <span
style=\'color: red; font-weight: bold\'>not</span> to be offered.', '6', '20', 'tep_cfg_select_multioption(array(\'Next
Day Air\', \'2nd Day Air\', \'Ground\', \'Standard\', \'Next Day Air Saver\', ',  now())");

 

 

here's what it was before I removed several methods:

 

/* 'MODULE_SHIPPING_UPSXML_TYPES', '', 'Select the UPS services <span style=\'color: red; font-weight:
bold\'>not</span> to be offered.', '6', '20', 'tep_cfg_select_multioption(array(\'Next Day Air\', \'2nd Day Air\', 
\'Ground\', \'Worldwide Express\', \'Worldwide Express Plus\', \'Worldwide Expedited\', \'Express\', \'Standard\', \'3 
Day Select\', \'Next Day Air Saver\', \'Next Day Air Early A.M.\', \'Expedited\', \'2nd Day Air A.M.\', \'Saver\', 
\'Express Early A.M.\', \'Express Plus\'), ',  now())");  */

Did I remove these shipping methods in the wrong place?

 

So far I have not been successful with Step 4 in adding the code to catalog/admin/includes/functions/general.php

 

Every time I add the code, The Admin area disappears. Could that be part of the problem.

Share this post


Link to post
Share on other sites
So far I have not been successful with Step 4 in adding the code to catalog/admin/includes/functions/general.php

 

Every time I add the code, The Admin area disappears. Could that be part of the problem.

Yes, the function you are supposed to add to that file (could also be added to the end of the file before the ?> at the end) is called when editing upsxml in modules. So if it is missing, it will cause an error and if the server is configured not to echo errors then you don't have a clue what is happening :)

Share this post


Link to post
Share on other sites

Does anyone have a fix for this error.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in D:\inetpub\vhosts\catalog\admin\modules.php(212) : eval()'d code on line 1

 

This occurs when i try to edit the configuration settings for the installed module. I have version 1.2.8.1 installed. Im able to save the settings but this error still shows up

 

Thanks for any help

Edited by cholondron

Share this post


Link to post
Share on other sites

1146 - Table 'db_database.table_packaging' doesn't exist

 

select *, (package_length * package_width * package_height) as volume from TABLE_PACKAGING order by volume;

 

I can't find right answer .

 

Thanks in advance

Share this post


Link to post
Share on other sites
1146 - Table 'db_database.table_packaging' doesn't exist

 

select *, (package_length * package_width * package_height) as volume from TABLE_PACKAGING order by volume;

 

I can't find right answer .

 

Thanks in advance

The Module is (probably) excellent - if works.

The SQL file install-upsxml creates “packaging” table ( CREATE TABLE packaging), but the declaration and Error are looking for table_packaging .

Is that right?

I changed the name of the packaging table to “table_packaging” and my error 1146 - Table 'db_database.table_packaging' doesn't exist , is gone,

but different one : Call to undefined function: cur_int() ; popup.

Is there something, I am missing?

 

Andrew

Share this post


Link to post
Share on other sites
I changed the name of the packaging table to “table_packaging” and my error 1146 - Table 'db_database.table_packaging' doesn't exist , is gone,

Looks like you didn't add the define for that table to admin/includes/database_tables.php. Admin, not the catalog side!

but different one : Call to undefined function: cur_int() ;

That is bad. You probably mean curl_init and if so, your ISP hasn't curl installed (you can check that in your admin->Tools->Server info and search for the heading "curl".) Without curl, no https connection, no connection with UPS possible.

Share this post


Link to post
Share on other sites
Does anyone have a fix for this error.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in D:\inetpub\vhosts\catalog\admin\modules.php(212) : eval()'d code on line 1

See the install instructions. Step 4 or 5 (field in table configuration not large enough).

Share this post


Link to post
Share on other sites
Looks like you didn't add the define for that table to admin/includes/database_tables.php. Admin, not the catalog side!

 

That is bad. You probably mean curl_init and if so, your ISP hasn't curl installed (you can check that in your admin->Tools->Server info and search for the heading "curl".) Without curl, no https connection, no connection with UPS possible.

Hi JanZ ,

Yes it is declared: in database_tables.php - define('TABLE_PACKAGING', 'packaging '); but anyway I am getting this error. Yes it goes about the curl_init, but I can’t find it at all in the Server info. There is nothing even close to the “curl” name . What should be the exact heading name? I am on a dedicated server, than should be not problem to turn it ON if only I know what I should ask for.

 

Thanks

 

Andrew

Share this post


Link to post
Share on other sites
Yes it is declared: in database_tables.php - define('TABLE_PACKAGING', 'packaging '); but anyway I am getting this error.

I checked the dimensions.txt in the package. You need it both on the admin side and the catalog side. Both sides the files database_tables.php is in the includes directory.

Yes it goes about the curl_init, but I can’t find it at all in the Server info. There is nothing even close to the “curl” name . What should be the exact heading name?

As I said: "curl"

I am on a dedicated server, than should be not problem to turn it ON if only I know what I should ask for.

Just say: I need curl enabled in PHP on my dedicated server. They know what curl is.

Share this post


Link to post
Share on other sites
I checked the dimensions.txt in the package. You need it both on the admin side and the catalog side. Both sides the files database_tables.php is in the includes directory.

 

As I said: "curl"

 

Just say: I need curl enabled in PHP on my dedicated server. They know what curl is.

 

Thanks !

No more missing table

Andrew

Share this post


Link to post
Share on other sites
Yes, the function you are supposed to add to that file (could also be added to the end of the file before the ?> at the end) is called when editing upsxml in modules. So if it is missing, it will cause an error and if the server is configured not to echo errors then you don't have a clue what is happening :)

 

Thank you for your answer. I tried adding the code to the end as you suggested but Admin disappeared again which is odd because I do understand how to add code and I'm sure I didn't make a mistake with that part. I have spent a lot of time in the last three years with the file structure so I know I'm using the correct file in the proper folder.

 

I've searched this thread and found an answer that I need to uninstall and reinstall. So I decided to start over again. I have already removed it from the Admin Shipping Modules. Now I will backup backup backup and then run the uninstall sql. This time no skipped steps. Thanks. Also I am going to learn how to configure my server to echo errors. I remember seeing a thread here about that. Thanks again.

Edited by D_Hues

Share this post


Link to post
Share on other sites

Hello,

 

Can some one instruct me on how to change the output. I need to go from,

 

United Parcel Service (XML) (1 pkg x 0 lbs total) (UPS Ground): to just

 

United Parcel Service Ground, basically United Parcel Service and the (shipping method). Do not need weight on shipping time.

 

Thanks JR

Share this post


Link to post
Share on other sites
Can some one instruct me on how to change the output. I need to go from,

 

United Parcel Service (XML) (1 pkg x 0 lbs total) (UPS Ground): to just

Actually, you need two parts to change. The first part to adapt starts around line 333 in upsxml.php (the shipping module):

		$upsQuote = $this->_upsGetQuote();
	if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) {
		if ($this->dimensions_support > 0) {
			$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . round($totalWeight,0) . ' ' . strtolower($this->unit_weight) . ' total)');
		} else {
			$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . round($shipping_weight,0) . ' ' . strtolower($this->unit_weight) . ' total)');
		}

But $this->title is defined in the language file for upsxml ( define('MODULE_SHIPPING_UPSXML_RATES_TEXT_TITLE', 'United Parcel Service (XML)'); )

Share this post


Link to post
Share on other sites

HI,

 

I am currently using UPS XML v1.2.7 and have since it was released. Until now the rates have been much more accurate than the original install (v1.1 or something like that), however now I am noticing my Next Day Air charges are about double what they should be (for example a 5 lb. package today was charged at $100 to the customer, actual was $50). Any ideas on how to fix it?

 

Thanks!

Adam

Share this post


Link to post
Share on other sites
See the install instructions. Step 4 or 5 (field in table configuration not large enough).

 

I have gone over both steps and everyone has been entered coorectly, Please advise and thanks for the response:

--------

Step 4

--------

 

*** Modify catalog/admin/categories.php as follows ***

 

A) At or near line 219, after the line:

 

'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),

 

insert the lines:

 

'products_height' => tep_db_prepare_input($HTTP_POST_VARS['products_height']),

'products_length' => tep_db_prepare_input($HTTP_POST_VARS['products_length']),

'products_width' => tep_db_prepare_input($HTTP_POST_VARS['products_width']),

'products_ready_to_ship' => tep_db_prepare_input($HTTP_POST_VARS['products_ready_to_ship']),

 

B) At or near line 293, change the line:

 

$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . tep_db_input($products_id) . "'");

 

to

 

$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_length, products_width, products_height, products_ready_to_ship, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . tep_db_input($products_id) . "'");

 

C) At or near line 296, change the line:

 

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . $product['products_quantity'] . "', '" . $product['products_model'] . "', '" . $product['products_image'] . "', '" . $product['products_price'] . "', now(), '" . $product['products_date_available'] . "', '" . $product['products_weight'] . "', '0', '" . $product['products_tax_class_id'] . "', '" . $product['manufacturers_id'] . "')");

 

to

 

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_price, products_date_added, products_date_available, products_weight, products_length, products_width, products_height, products_ready_to_ship, products_status, products_tax_class_id, manufacturers_id) values ('" . $product['products_quantity'] . "', '" . $product['products_model'] . "', '" . $product['products_image'] . "', '" . $product['products_price'] . "', now(), '" . $product['products_date_available'] . "', '" . $product['products_weight'] . "', '" . $product['products_length'] . "', '" . $product['products_width'] . "', '" . $product['products_height']. "', '" . $product['products_ready_to_ship'] . "', '0', '" . $product['products_tax_class_id'] . "', '" . $product['manufacturers_id'] . "')");

 

D) At or near line 370, after the line:

 

'products_weight' => '',

 

insert the lines:

 

'products_length' => '',

'products_width' => '',

'products_height' => '',

'products_ready_to_ship' => '',

 

E) At or near line 385, change the line:

 

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

to

 

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, products_length, products_width, products_height, products_ready_to_ship, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

F) At or near 590, change

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>

</tr>

 

to

 

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_LENGTH; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_length', $pInfo->products_length); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WIDTH; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_width', $pInfo->products_width); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_HEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_height', $pInfo->products_height); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_READY_TO_SHIP; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_checkbox_field('products_ready_to_ship', '1', (($product['products_ready_to_ship'] == '1') ? true : false)); ?></td>

</tr>

 

 

G) At or near line 627, change the line:

 

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . $HTTP_GET_VARS['pID'] . "'");

 

to

 

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . $HTTP_GET_VARS['pID'] . "'");

 

Whew!!

 

--------

Step 5

--------

 

A) Modify the file catalog/admin/includes/languages/english.php, adding the line:

 

define('BOX_TOOLS_PACKAGING', 'Packaging');

 

B) Modify the file catalog/admin/includes/languages/english/categories.php

 

Add the following definitions (the file is arranged in alphabetical order)

 

define('TEXT_PRODUCTS_HEIGHT', 'Height:');

define('TEXT_PRODUCTS_LENGTH', 'Length:');

define('TEXT_PRODUCTS_WIDTH', 'Width:');

define('TEXT_PRODUCTS_READY_TO_SHIP', 'Ready to ship:');

define('TEXT_PRODUCTS_READY_TO_SHIP_SELECTION', 'Product can be shipped in its own container.');

Edited by cholondron

Share this post


Link to post
Share on other sites
I have gone over both steps and everyone has been entered coorectly,

No, not correct because you are quoting from the additional instructions to install the dimensions support instead of from the readme.txt that deals with the "basic" installation of upsxml:

--------
STEP 5
--------

The configuration key which allows for selecting the types of methods to show your customers is type "VARCHAR(255)" in the
stock osC installation, which is not long enough to hold all of the possible UPS methods.

You have 2 options to deal with this:

 1) Go to the configuration table in your database and change the type for
  field "set_function" from VARCHAR(255) to TEXT

  -- OR --

 2) In catalog/includes/modules/shipping/upsxml.php (about line 291)
  Find the key MODULE_SHIPPING_UPSXML_TYPES
  and remove several of the shipping methods listed there to reduce the field to
  less than 255 characters (for example remove: " \'Next Day Air Early A.M.\', " and
  " \'2nd Day Air A.M.\', " ) Check the language file to see what options will be returned
  in your part of the world (in Europe there are only 4, so UPS Ground will never be presented
  to your customers as an option there).
  Do *not* remove options you want to exclude, only options that you will never get from UPS
  or those that you do not want to exclude should be removed!

If you haven't done any of the above mentioned two things while installing, you will get an error message in the admin section:
 "Parse error: parse error, unexpected ';' in ....../admin/modules.php(235): eval()'d code on line 1"
To rectify that, do any of the two options above, go to the admin section, shipping and "remove" upsxml, then "install" upsxml (again).
It will not render the module unusable if you don't fix it, you will just not be able to disable shipping options.

Share this post


Link to post
Share on other sites

I am also now receiving this error, although I think it has to do with the UPS rates server being down (or something like that) but better to get a second opinion:

 

Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway

 

I called UPS and they 'claimed' that their servers are all working fine and that they never have problems ever but I am not sure I believe that. Any help? Thanks in advance!

Share this post


Link to post
Share on other sites
I am currently using UPS XML v1.2.7 and have since it was released. Until now the rates have been much more accurate than the original install (v1.1 or something like that), however now I am noticing my Next Day Air charges are about double what they should be (for example a 5 lb. package today was charged at $100 to the customer, actual was $50). Any ideas on how to fix it?

To be honest, I don't have a clue. It could be that UPS is sending the wrong data. You would only know if you enable logging of the requests and replies. With a busy shop this becomes a big file quickly. There are quite a few Next Day Air services (01, 13, and 14: Next Day Air, Next Day Air Saver, Next Day Air Early A.M.). There is no ambiguity about what is what?

Does it happen consistently or occasionally?

 

Once you have a reply from UPS that sends data of which Next Day Air is doubled, please post it, than I can see what happens and try to find out why reading in the reply in UPSXML.

 

The "unknown" error is really a catch all from the module itself. You need to log the replies to see what UPS returns (although I have seen complete errors too....). Or log just the errors after a while. You didn't get any emails about errors (option in the module)?

Share this post


Link to post
Share on other sites
To be honest, I don't have a clue. It could be that UPS is sending the wrong data. You would only know if you enable logging of the requests and replies. With a busy shop this becomes a big file quickly. There are quite a few Next Day Air services (01, 13, and 14: Next Day Air, Next Day Air Saver, Next Day Air Early A.M.). There is no ambiguity about what is what?

Does it happen consistently or occasionally?

 

Once you have a reply from UPS that sends data of which Next Day Air is doubled, please post it, than I can see what happens and try to find out why reading in the reply in UPSXML.

 

The "unknown" error is really a catch all from the module itself. You need to log the replies to see what UPS returns (although I have seen complete errors too....). Or log just the errors after a while. You didn't get any emails about errors (option in the module)?

 

This is regarding the 01 Next Day Air service, sorry for not being more specific in my first post.

 

I have not had a problem in a very long time. We had been using the UPS XML module since the very start. I upgraded it from 1.1 to 1.2.7 around July of this year due to the rates being very far off. I am not sure if we had any other orders closer to April that were using the Next Day Air method which were off but I don't recall they were. I also used to log in v1.1 and tried logging in v1.2.7 but for some reason it will not append to my existing upsxml.log file or even a new one with the proper CHMOD (I just noticed it hasn't logged since July).

 

I am no PHP/FTP/SQL/web novice but I have no idea why this seemingly happened at around noon today for some reason, no changes were made to any files on my server before it happened. I did notice the URL in the upsxml.php file where it obtains the rates is "wwwcie.ups.com : wwwcie.ups.com" for v1.2.7 and "wwwcie.ups.com : www.ups.com " for v1.2.8. I changed this in my file but no luck, not sure if that is even the right track. I am receiving a different error now (slightly), maybe it will help:

 

Rating and Service 1.0001 0 MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNWON_ERROR : Rating and Service 1.0001 0 MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNWON_ERROR

 

I'm no genius but the substring 'RATES_TEXT_COMM' sounds like a communications problem with UPS, any ideas?

Edited by DeckGuy Adam

Share this post


Link to post
Share on other sites

Has anyone seen this error before?

 

--------------------------

0 -

 

select p.products_id, p.products_price, p.products_length, p.products_weight, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p where p.products_id in (34,)

 

[TEP STOP]

 

-----------------------------

My checkout process and UPS XML(v1.2.8) was going along fine until I tried to add Giftwrap v1.1. During testing, this error started popping up when trying to get to the checkout_shipping page. After reinstalling the giftwrap module a few times to see if I just messed up the install, I scrapped it and put back my backup files. However, I still am getting this error and can't tell where it's from. Can anyone help?

Share this post


Link to post
Share on other sites
I did notice the URL in the upsxml.php file where it obtains the rates is "wwwcie.ups.com : wwwcie.ups.com" for v1.2.7 and "wwwcie.ups.com : www.ups.com " for v1.2.8. I changed this in my file but no luck, not sure if that is even the right track.
Well, that means in the older versions the test server would be used, whatever your settings where in admin. This was corrected in later versions. But that was done much earlier than 1.2.7....

 

I am receiving a different error now (slightly), maybe it will help:

 

Rating and Service 1.0001 0 MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNWON_ERROR : Rating and Service 1.0001 0 MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNWON_ERROR

 

I'm no genius but the substring 'RATES_TEXT_COMM' sounds like a communications problem with UPS, any ideas?

Actually, it looks like you don't use the latest files in the shipping modules. As you can see the "UNKNWON" has a typo, one of the things that were corrected in a later version. As far as I can see this was already fixed in version 1.1.4 (December 2004).

Share this post


Link to post
Share on other sites
However, I still am getting this error and can't tell where it's from.

It is from the function get_products_for_packaging that you must have added for the split products mod. For some reason you have empty or not valid stuff in the contents array of the shopping cart:

   function get_products_for_packaging() {

  if (!is_array($this->contents)) return false;
  $products_array = array();
  foreach ($this->contents as $products_id => $subarray) {
	$products_id_array[] = tep_get_prid($products_id);
  }	  // due to attributes there might be multiple instances of products_id's
  $products_id_array = array_unique($products_id_array);
  $no_of_products_ids = count($products_id_array);

	$products_query = tep_db_query("select p.products_id, p.products_price, p.products_length, p.products_weight, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from " . TABLE_PRODUCTS . " p where p.products_id in (" . implode(",", $products_id_array) . ")");

I never anticipated that...

I guess another check should help. Something along the lines of:

 

	  foreach ($this->contents as $products_id => $subarray) {
// only add valid products_id's to the array, not when tep_get_prid returns false
 $valid_products_id = tep_get_prid($products_id);
if (tep_not_null($valid_products_id)) {
	$products_id_array[] = $valid_products_id;
} // end  if (tep_not_null($valid_products_id))
  }	  // due to attributes there might be multiple instances of products_id's

Share this post


Link to post
Share on other sites

Hmm I didn't consider that, I will double check that mod and its instructions, I may need to add stuff back to it to make it work or just remove it because we do not use it any longer. In any event it may be good to add what you have suggested to your contribution as it would make it more robust.

 

The only problem with the fix you suggested is that using v1.2.7 it worked fine from July until today around 12pm; after lunch today it went haywire. Our web hosting provider (not GoDaddy) once shut off our cURL because they thought our site was a pr0n server due to the activity level (we sell PC keyboards). I called them first and they assured me cURL is still on and no changes were made to our account. I also called UPS and of course the phone techs will tell me nothing is wrong because they don't know any better. I think I am going to give both a call back, hopefully I will know more by tomorrow, thanks for your quick responses!

Share this post


Link to post
Share on other sites
It is from the function get_products_for_packaging that you must have added for the split products mod. For some reason you have empty or not valid stuff in the contents array of the shopping cart:

   function get_products_for_packaging() {

  if (!is_array($this->contents)) return false;
  $products_array = array();
  foreach ($this->contents as $products_id => $subarray) {
	$products_id_array[] = tep_get_prid($products_id);
  }	  // due to attributes there might be multiple instances of products_id's
  $products_id_array = array_unique($products_id_array);
  $no_of_products_ids = count($products_id_array);

	$products_query = tep_db_query("select p.products_id, p.products_price, p.products_length, p.products_weight, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from " . TABLE_PRODUCTS . " p where p.products_id in (" . implode(",", $products_id_array) . ")");

I never anticipated that...

I guess another check should help. Something along the lines of:

 

	  foreach ($this->contents as $products_id => $subarray) {
// only add valid products_id's to the array, not when tep_get_prid returns false
 $valid_products_id = tep_get_prid($products_id);
if (tep_not_null($valid_products_id)) {
	$products_id_array[] = $valid_products_id;
} // end  if (tep_not_null($valid_products_id))
  }	  // due to attributes there might be multiple instances of products_id's

 

 

Thank you Jan for helping with this. I NEVER would have figured this one out. I applied your check and it seems to work or at least it is back to bringing up the shipping info as before. I am going to try much later tonight to see if I can get it to work together with Giftwrap and then I will post results.

 

 

Thank you very much for all the support you add to this contrib.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×