Jump to content
torinwalker

New UPS XML Shipping Module available

Recommended Posts

I can almost guarantee you this is caused by an error caused when you added code to admin/categories.php. The value for products_id is zero, and that cannot be.

 

Thxs for the advice. Forgive me for my ignorance. I am a newbie. What should the value be and how do I change it?

Share this post


Link to post
Share on other sites

Thxs for the advice. Forgive me for my ignorance. I am a newbie. What should the value be and how do I change it?

 

It's not quite that simple. The product ID is the ID of the product you are editing. It's passed in the querystring as pID=number. Make sure that the ID is getting passed in the query string (address bar) first. From there take a look at where you see $HTTP_GET_VARS[pID] or something similar.

 

I hope that helps

Share this post


Link to post
Share on other sites

It's not quite that simple. The product ID is the ID of the product you are editing. It's passed in the querystring as pID=number. Make sure that the ID is getting passed in the query string (address bar) first. From there take a look at where you see $HTTP_GET_VARS[pID] or something similar.

 

I hope that helps

 

I cannot get it. What is the easiest way for me to fix this problem? I tried using the /admin/categories.php file that came with the package. It is not working too.

Share this post


Link to post
Share on other sites

I cannot get it. What is the easiest way for me to fix this problem? I tried using the /admin/categories.php file that came with the package. It is not working too.

 

It's hard to say what the problem is exactly. Worst case you might have to take out all of the Ultimate SEO contributions and start from there. categories.php is one of the most complex files in the package making it difficult to troubleshoot even for experienced developers. You might try posting your code and seeing if anyone can help you

Share this post


Link to post
Share on other sites

These are the changes that I have made. Includes a few lines up and down.

 

Line 211

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

tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&pID=' . $products_id));

break;

case 'insert_product':

case 'update_product':

if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {

$action = 'new_product';

} else {

if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);

$products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

 

$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

 

$sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

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

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

'products_date_available' => $products_date_available,

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

'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']),

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

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

'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));

 

if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {

$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);

}

 

if ($action == 'insert_product') {

$insert_sql_data = array('products_date_added' => 'now()');

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

 

Line 300

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

} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {

$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 = '" . (int)$products_id . "'");

$product = tep_db_fetch_array($product_query);

 

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 ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '" . tep_db_input($product['products_length']) . "', '" . tep_db_input($product['products_width']) . "','" . tep_db_input($product['products_height']) . "', '" . tep_db_input($product['products_ready_to_ship']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");

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

 

Line 367

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

<?php

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_price' => '',

'products_weight' => '',

'products_length' => '',

'products_width' => '',

'products_height' => '',

'products_ready_to_ship' => '',

'products_date_added' => '',

'products_last_modified' => '',

'products_date_available' => '',

'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => '');

 

$pInfo = new objectInfo($parameters);

 

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

$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 . "'");

$product = tep_db_fetch_array($product_query);

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

 

 

Line 593

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

?>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

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

<?php

if (isset($pInfo->products_id) && tep_not_null($pInfo->products_id)) {

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

 

Line 669

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

} elseif ($action == 'new_product_preview') {

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

$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 = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

}

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

 

I have installed Ultimate SEO. Not sure if that clashes with this UPS XML addon. Greatly appreciate any kind of help. Thxs in advance.

Share this post


Link to post
Share on other sites

I have encountered a problem with transit times not being returned for zip-codes which have multiple cities associated. One example zip-code is 38002.

 

Anyone know how i can update the code to fix this?

 

Thanks,

 

Jeremy

Share this post


Link to post
Share on other sites

I've just installed UPS XML on a new site I've created (new to OSC) and everything appears to work great except I always get 1 (one) box at checkout. Each one of my auto parts is in a box of it's own for shipping. Why does it only use one box? Can I default OSC to put each item in it's own box? If I add dimensional support will it then offer one box per item?

 

 

Thanks,

Cary

Edited by JoeySchmoe

Share this post


Link to post
Share on other sites

This is a pretty versatile program even though it has limitations.

If you have ALL of your products already in defined boxes, then it's easy.

Go into each products and:

-Define the dimensions of the product including the box ( not just the product itself )

-Click "Ready to ship"

 

If you don't want to go with the above route:

The reason why it's only useing one box is that you probably have not defined any package ( admin/tools/packaging ).

You need to create a package for every possibility. EG: If you have a product with dimensions 4x4x6 and want to ship one product or 2 products together they you need to crate 2 packaging:

 

4x4x6

8x8x12

 

The program puts products together depending on the packaging YOU create.

 

Anyway the "Ready to ship" should work for you without packaging if your products are already packaged.

 

Good luck.

 

Edited by BertaRecchia

Share this post


Link to post
Share on other sites

I have an odd situation that I need some advice on (perhaps it isn't as odd as I think). :blush:

 

Normally, I thought the UPS XML module would break an order up into packages based on the maximum weight that UPS allows. i.e. If an order weighs 230 pounds, then the order would be broken into 2 boxes and appropriate charges would return based on the two boxes and their presumed weight (150 lbs for the first, the UPS maximum for weight, and 80 pounds for the second).

 

Am I wrong in believing this is the way it should be? Or do I need to install the extra dimensional support? Or merely the package splitting part?

 

If I need to install the dimensional support, then can I do dimensional support without actually getting into the size of items (only the weight)?

 

Thanks for any advice!

Share this post


Link to post
Share on other sites

You have to enable dimensional support With product dimensions in admin/configuration. That's the quick part.

As I answered the guy above your question..... you need to create packages in order to do what you want.

/admin/packaging

The program looks at what packages you create and tried to put your products in those boxes.

EG:

You have 200 LB of gold.

 

Create a package 20 x 10 x 10 with a max weight of 140LB.

 

The XML program will create 2 boxes, 1 weighing 140Lb ( + the tare weight of the box itself that you decide ) and 1 box of 60Lb.

 

Keep in mind that the program goes has its limits. It picks packages based on volume. If you create many packages of similar volume, it might pick the one you don't want.

 

I spent a month figuring out this program then I had to pay a vietnamese guy for a mod to force my products to use only specific boxes. If you need just a few packages, don't worry.

 

Good luck

Share this post


Link to post
Share on other sites

I'm really only interested in the weight aspect, not the dimensional aspect. So I'll give it a go with your suggestion.

 

Thanks!

Share this post


Link to post
Share on other sites

I'm using the full dimensional support, but the dimensions are not being saved in the listings. How can I fix this?

 

 

Nevermind! I figured it out :)

Share this post


Link to post
Share on other sites

dimensions are not being saved in the listings.

Personally, I don't have the faintest what you are talking about.

Share this post


Link to post
Share on other sites

Personally, I don't have the faintest what you are talking about.

 

Jan, what I had meant was that I would enter the LWH into the listing. I would then save the listing and exit. When I would go back to look at the same listing, the L, W, and H fields would be blank again. However, I've figured out that the dimensions have actually been saved. They just aren't appearing in the fields.

 

I don't know if that makes any more sense.

Share this post


Link to post
Share on other sites

Quick query:

 

Lets say I have an item that is (11 x 11 x 7). I can fit 6 of these items into my largest box (23x22x22).

If a 7th item is ordered, it will send it into a separate box, which is what I want. The problem is that it's trying to fit it into another LARGE (23x22x22) box, when it really only needs to be in a (12 x 12 x 8) box.

 

If this makes any sense, how can I fix this?

Share this post


Link to post
Share on other sites

Quick query:

 

Lets say I have an item that is (11 x 11 x 7). I can fit 6 of these items into my largest box (23x22x22).

If a 7th item is ordered, it will send it into a separate box, which is what I want. The problem is that it's trying to fit it into another LARGE (23x22x22) box, when it really only needs to be in a (12 x 12 x 8) box.

 

If this makes any sense, how can I fix this?

 

Did you create a package 12 x 12 x 8 ? Make sure that each box has the correct max weight and empty weight defined. Also make sure all your "cost actions" are 0. If you don't have the correct parameters in the small box, the system will pick the big one.

 

Another suggestion: if you're using UPS make sure that as you define your package sizes/weight you test the same on the UPS website to see how much it costs. Sometimes one inch more can double the cost.

 

Share this post


Link to post
Share on other sites

However, I've figured out that the dimensions have actually been saved. They just aren't appearing in the fields.

I assume that part of the code needed for using the dimensions is installed correct but that the dimensions for the product are not queried. Possibly a query that wasn't updated to include the dimensions.

Share this post


Link to post
Share on other sites

Did you create a package 12 x 12 x 8 ? Make sure that each box has the correct max weight and empty weight defined. Also make sure all your "cost actions" are 0. If you don't have the correct parameters in the small box, the system will pick the big one.

 

Another suggestion: if you're using UPS make sure that as you define your package sizes/weight you test the same on the UPS website to see how much it costs. Sometimes one inch more can double the cost.

 

 

Ahh thank you! I was using cost-actions, and I'm pretty sure that is what flubbed me up. Many thanks, Berta.

Share this post


Link to post
Share on other sites

Ahh thank you! I was using cost-actions, and I'm pretty sure that is what flubbed me up. Many thanks, Berta.

 

Np. Anytime. I spent countless hours figuring it out. At least I put them to use!

 

Share this post


Link to post
Share on other sites

@paviii - you saved my butt on this big time; thanks for the post!!

 

To get free ground shipping while still providing other full price shipping methods for either UPS or FedEx I made the following change in the following file:

 

/includes/modules/shipping/upsxml.php

 

Near line 330 in my file - find

 

$methods = array();

for ($i=0; $i < sizeof($upsQuote); $i++) {

list($type, $cost) = each($upsQuote[$i]);

// BOF limit choices, behaviour changed from versions < 1.2

if ($this->exclude_choices($type)) continue;

// EOF limit choices

 

Add the following

if ($order->info['subtotal'] > 100) {

if (stristr($type, 'Ground')) { $cost = '0.00'; }

}

 

Note: The above allow free shipping for orders over $100. If you want something different just change the '100' in the first line. You could also do this for other UPS shipping methods by changing the 'Ground' type.

Share this post


Link to post
Share on other sites

First let me say great addition!

 

I have a problem when I try to add products or edit products that were there prior to installing. Below is what I get:

 

1054 - Unknown column 'products_length' in 'field list'

 

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 products p, products_description pd where p.products_id = '66' and p.products_id = pd.products_id and pd.language_id = '1'

 

 

I have searched here and can't seem to find an answer. ....I do not need dimensions for my products if it is possible to do.

 

Thanks -Keith

Share this post


Link to post
Share on other sites

First let me say great addition!

 

I have a problem when I try to add products or edit products that were there prior to installing. Below is what I get:

 

1054 - Unknown column 'products_length' in 'field list'

 

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 products p, products_description pd where p.products_id = '66' and p.products_id = pd.products_id and pd.language_id = '1'

 

 

I have searched here and can't seem to find an answer. ....I do not need dimensions for my products if it is possible to do.

 

Thanks -Keith

 

 

....Fixed it----

Share this post


Link to post
Share on other sites

Having a problem with this Shipping Module. Its been installed for a while but it just came to my attention that it is charging TAX on the shipping even with the setting disabled in the admin section. In addition to that it is charging DOUBLE tax on the shipping!?!? For example a $1.00 item plus $10.00 shipping at 7% sales tax is being charged $1.47 in sales tax. So its charging tax on $21 and not $11 like it should.

 

Any idea what could be going on here??

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

×