Page 1 of 1
[SOLVED] UPS shipping module failing?
Posted: Wed Apr 21, 2010 12:15 pm
by rdavis852
I have a very generic install of OC and everything seems to be working great except when I try to check out.
I've tried both guest and creating a new account. Once I hit the check out button I get the following:
Unknown: Object of class DOMElement could not be converted to string in /home1/ageneric/public_html/medxtras/catalog/model/shipping/ups.php on line 218
Fatal error: Call to a member function getElementsByTagName() on a non-object in /home1/ageneric/public_html/medxtras/catalog/model/shipping/ups.php on line 220
Is this telling me that the call to the UPS XML is failing or is something else wrong?
Thanks for the help.
RD
Re: UPS shipping module failing?
Posted: Wed Apr 21, 2010 1:28 pm
by Qphoria
Yea when UPS has an error, it is showing that. This was something left over from 1.4.6 that wasn't discovered. It is planned for fix in 1.4.8. Not sure what the issue is as this time
Re: UPS shipping module failing?
Posted: Sat May 01, 2010 5:04 am
by Qphoria
Ok i figured this out.
Its a simple accidental reuse of a variable
Solution:
1. EDIT: catalog/model/shipping/ups.php
2. FIND:
Code: Select all
$error = $error->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error .= ': ' . $error->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
3. REPLACE WITH
Code: Select all
$error_msg = '';
$error_msg = $error->getElementsByTagName('ErrorCode')->item(0)->nodeValue;
$error_msg .= ': ' . $error->getElementsByTagName('ErrorDescription')->item(0)->nodeValue;
4. FIND:
5. REPLACE WITH:
Re: [SOLVED] UPS shipping module failing?
Posted: Sat May 22, 2010 5:04 am
by palynch
i tried this. it does not give an error now but it still wont show up as an option. i am using 1.4.7. I have the correct access key and it is not in test mode. What can i do??
Re: [SOLVED] UPS shipping module failing?
Posted: Sat May 22, 2010 5:06 am
by Qphoria
Try it in testmode
Re: [SOLVED] UPS shipping module failing?
Posted: Mon May 24, 2010 4:28 am
by American
Worked for me just fine. One thing I noticed is that the Zip Code is not a required field in the checkout form yet if you don't enter a zip you will get an error from UPS saying that they don't have a shipping option for your location...etc.
Might want to make the zip required to bypass that problem.
Re: [SOLVED] UPS shipping module failing?
Posted: Mon May 24, 2010 4:31 am
by grgolf
I made all the changes and everything seem to work fine except a now get undefined variable catalog/model/shipping/ups.php on line 263 in my error log. Any help would be appreciated.
Re: [SOLVED] UPS shipping module failing?
Posted: Mon May 24, 2010 1:07 pm
by Qphoria
The zip is kinda fickle because if shipping from or to a place like Hong Kong, there is no Postcode and the postcode is not required by UPS. If I set it to required in the account create, then you'd have to enter something like 00000 to get the form to bypass the validation. But that might break UPS.
Re: [SOLVED] UPS shipping module failing?
Posted: Tue May 25, 2010 8:50 am
by palynch
i get the same error. It works but has this error at the top of the page
Notice: Undefined variable: error_msg in D:\Domains\prodjsupply.com\wwwroot\catalog\model\shipping\ups.php on line 263
Re: [SOLVED] UPS shipping module failing?
Posted: Sun May 30, 2010 1:57 pm
by gorillaman
Followed the steps editing the UPS php file and now it goes through to shipping options but does not list UPS. Tried in test mode as well. Help me please!!!
Re: [SOLVED] UPS shipping module failing?
Posted: Sun May 30, 2010 7:56 pm
by American
gorillaman wrote:Followed the steps editing the UPS php file and now it goes through to shipping options but does not list UPS. Tried in test mode as well. Help me please!!!
You might want to wait a bit as 1.4.8 is supposed to be released today with several fixes.
http://www.opencart.com/index.php?route ... &blog_id=9