I am running 1.4.4 and when i try to checkout and use UPS for the shipping, i get this message:
Error: Shipping method required!
I have the access key and all other info set according to what ups sent me. Any suggestions?
Error: Shipping method required!
I have the access key and all other info set according to what ups sent me. Any suggestions?
There are 2 things I noticed with this module.
1. The problem where clicking next takes you back to the shipping choices with "Error: Shipping Method Required"
2. It has a hardcoded conversion to USD for some reason.
The fix for the first one is very simple. And the reason is clear as well.
In all shipping modules, it uses the individual id for each quote as the same name as the key (say wha?)
INCORRECT:

CORRECT:

The fix is simple.... As shown in the picture
1. EDIT: catalog/model/shipping/ups.php
2. FIND:
3. REPLACE WITH:
I am unsure of the reason for forcing all rates to USD.
1. The problem where clicking next takes you back to the shipping choices with "Error: Shipping Method Required"
2. It has a hardcoded conversion to USD for some reason.
The fix for the first one is very simple. And the reason is clear as well.
In all shipping modules, it uses the individual id for each quote as the same name as the key (say wha?)
INCORRECT:

CORRECT:

The fix is simple.... As shown in the picture
1. EDIT: catalog/model/shipping/ups.php
2. FIND:
Code: Select all
'id' => 'ups.' . strtolower($this->config->get('ups_origin')) . '_' . $code,
Code: Select all
'id' => 'ups.' . $code,
HALLELUJAH!!!
Q, you're a genius, a lifesaver, and the sexiest individual on the planet. Nay, in the Universe. If you were standing in front of me, I might just kiss you full on the mouth.
If you're ever in Texas, call me and I'll buy you a beer. Unless you don't like Texas beers, in which case I'll treat you to some good BBQ and a Dublin Dr. Pepper.
(And I won't kiss you, really. I promise.)
Q, you're a genius, a lifesaver, and the sexiest individual on the planet. Nay, in the Universe. If you were standing in front of me, I might just kiss you full on the mouth.
If you're ever in Texas, call me and I'll buy you a beer. Unless you don't like Texas beers, in which case I'll treat you to some good BBQ and a Dublin Dr. Pepper.
(And I won't kiss you, really. I promise.)
Last edited by jlg89 on Wed Mar 24, 2010 5:05 am, edited 1 time in total.
While on the topic of broken shipping modules in 1.4.4, has anyone tested the fedex module?
When I was troubleshooting the weight conversion code, I noticed fedex was referring to weight_class_id which I thought was deprecated a few versions back.
When I was troubleshooting the weight conversion code, I noticed fedex was referring to weight_class_id which I thought was deprecated a few versions back.
If that's soQphoria wrote:There is no fedex module in 1.4.4
/catalog/model/shipping/fedex.php
and
/catalog/language/english/shipping/fedex.php
can probably be removed.
While on the topic of the UPS module, it seems to be broken. Instead of printing the error message (Ex: If a user enters a zip code that doesn't match the zone they've chosen), it prints a nasty PHP error. The fix for the PHP error is:
On lines 218-220, change
to
However, it still doesn't print the $error to the screen like it should. Instead it just shows step 2 with no shipping methods listed. I'm still trying to figure that one out.
On lines 218-220, change
Code: Select all
$error .= $error->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error .= ': ' . $error->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
Code: Select all
$error .= $response->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error .= ': ' . $response->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
However, it still doesn't print the $error to the screen like it should. Instead it just shows step 2 with no shipping methods listed. I'm still trying to figure that one out.
I found the bug report a little late... I had already found what I thought was the problem and made the following changes.
$quote_data[$code] = array(
// 'id' => 'ups.' . strtolower($this->config->get('ups_origin')) . '_' . $code,// commented this line
'id' => 'ups.' . $code,// added this line
Please let me know if this solution is good enough or if I need to make the changes Q suggested. I don't want the site blowing up while I'm on holiday.
Thanks,
Yank
$quote_data[$code] = array(
// 'id' => 'ups.' . strtolower($this->config->get('ups_origin')) . '_' . $code,// commented this line
'id' => 'ups.' . $code,// added this line
Please let me know if this solution is good enough or if I need to make the changes Q suggested. I don't want the site blowing up while I'm on holiday.
Thanks,
Yank
There are 2 problems with the error response reporting (both in catalog/model/shipping/ups.php):
First the variable $error is supposed to be a string but is set to an xml node. Change the lines:
To:
And then at the bottom it is currently only creating the $method_data array if there is quote data. If there is an error there is no quote data, so you need to test for the error as well.
Change the lines:
To:
First the variable $error is supposed to be a string but is set to an xml node. Change the lines:
Code: Select all
$error = $response->getElementsByTagName('Error')->item(0);
$error .= $error->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error .= ': ' . $error->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
Code: Select all
$errorNode = $response->getElementsByTagName('Error')->item(0);
$error .= $errorNode->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error .= ': ' . $errorNode->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
Change the lines:
Code: Select all
if ($quote_data) {
$method_data = array(
'id' => 'ups',
'title' => $this->language->get('text_title'),
'quote' => $quote_data,
'sort_order' => $this->config->get('ups_sort_order'),
'error' => $error
);
}
Code: Select all
if ($quote_data || strlen($error)>0) {
$method_data = array(
'id' => 'ups',
'title' => $this->language->get('text_title'),
'quote' => $quote_data,
'sort_order' => $this->config->get('ups_sort_order'),
'error' => $error
);
}
Who is online
Users browsing this forum: No registered users and 3 guests