Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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
Link to comment
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!

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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?

Link to comment
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.

 

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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

Link to comment
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----

Link to comment
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??

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