Post by rdavis852 » Wed Apr 21, 2010 12:15 pm

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

Newbie

Posts

Joined
Wed Apr 14, 2010 3:54 am

Post by Qphoria » Wed Apr 21, 2010 1:28 pm

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat May 01, 2010 5:04 am

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:

Code: Select all

'error'      => $error
5. REPLACE WITH:

Code: Select all

'error'      => $error_msg

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by palynch » Sat May 22, 2010 5:04 am

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

Newbie

Posts

Joined
Wed Mar 03, 2010 10:28 am

Post by Qphoria » Sat May 22, 2010 5:06 am

Try it in testmode

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by American » Mon May 24, 2010 4:28 am

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.

Brad G
Granbury, Texas
OC 1.5.6.4


User avatar
New member

Posts

Joined
Fri May 21, 2010 7:39 am
Location - Fort Worth, Texas

Post by grgolf » Mon May 24, 2010 4:31 am

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.

New member

Posts

Joined
Tue Feb 02, 2010 3:31 am

Post by Qphoria » Mon May 24, 2010 1:07 pm

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by palynch » Tue May 25, 2010 8:50 am

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

Newbie

Posts

Joined
Wed Mar 03, 2010 10:28 am

Post by gorillaman » Sun May 30, 2010 1:57 pm

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

Newbie

Posts

Joined
Sun May 30, 2010 1:47 pm

Post by American » Sun May 30, 2010 7:56 pm

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

Brad G
Granbury, Texas
OC 1.5.6.4


User avatar
New member

Posts

Joined
Fri May 21, 2010 7:39 am
Location - Fort Worth, Texas
Who is online

Users browsing this forum: No registered users and 5 guests