Having a problem...

Permalink Browser Info Environment
Fatal error: Unsupported operand types in /home/wmwpump/public_html/packages/core_commerce_ups/models/core_commerce/shipping/types/ups/controller.php on line 320



Also, it would be good to have some kind of documentation - perhaps the whole API thing with UPS. I'm fumbling my way through it right now.

Type: Discussion
Status: New
WebSolutions
View Replies:
WebSolutions replied on at Permalink Reply
WebSolutions
With the API thing, I don't know what is necessary, first, UPS says

Production access is granted based upon approval... NOT guaranteed. Each request will be reviewed and approved or denied...

is this something that I need to worry about?

Also, I'm given the option for:

Locator - Package
Pickup - Ground Freight
Pickup - Package
Rating - Ground Freight
Shipping - Ground Freight
Shipping - Package


I'm not an API programmer, just trying to make this module work within the site.
tbcrowe replied on at Permalink Reply
tbcrowe
I've been away for the last week and just saw your message. I've not run into the "unsupported operand types" error (line 320) before. Looking over the code that error should not be possible unless UPS is returning something strange in your case. I don't have enough information at this point to debug it. If you are still experiencing the problem, please let me know and I would be happy to work through it with you. I'll need to give you an updated file and/or package to get additional debugging information.

With regards to documentation and the UPS API. There is documentation included with the package in the readme.txt file. included in that are some brief instructions on setting up a UPS account. I don't go into a lot of detail there because I don't have any control over UPS's sign up or approval process and they could change it at any time. I don't recall seeing anything about the options you mention ("Locator - Package", "Pickup - Ground Freight", etc). Those may be something new. I don't know how they would apply to the UPS rate/address verification service. If you can provide more context for these options I might be able to tell you more about them.

- Todd
WebSolutions replied on at Permalink Reply
WebSolutions
Im having the problem again. The problem takes effect as soon as I set Product Dimensions to YES. If it's NO, it isn't a problem. Can we do the whole diagnostics thing?
WebSolutions replied on at Permalink Reply
WebSolutions
It seems to be working now for no apparent reason. I'll let you know if it happens again.

Is there any way to add a % or $ to the rate that UPS bills?

I seem to be getting the rates okay, but are they in U.S. currency? We bill in CDN Currency. Can I get it in CDN somehow?
tbcrowe replied on at Permalink Reply
tbcrowe
I looked over the UPS API to see if there was a way to set the currency. I do not see a way to do so. Based on what I saw and by testing using Canada as my country/postal code, though, it appears that UPS automatically return the amounts in the currency of the shipper's country (in your case CAD). UPS does return the currency code in the API response, and I was able to verify that the code returned was CAD.

At present the UPS module does not allow the addition of a fixed fee per product and/or shipment. My USPS module does, but I haven't implemented the same thing in UPS yet.
WebSolutions replied on at Permalink Reply
WebSolutions
Thanks for looking into that, much appreciated. The reason I asked is because I did a test shipment with ups' website form, and it came back as a higher amount than the C5 shopping cart showed. I'm just hoping that everything is going to pan out when we go live.

An alternative way that we have handled the added price is that we have just added a percentage onto the weight, which does the same job.
tbcrowe replied on at Permalink Reply
tbcrowe
I'm not sure why the module would find lower rates than UPS, the data is coming from UPS. Keep in mind that in many situations (e.g. ones where more than one product are ordered), the UPS module needs to make some assumptions about how things will be packaged. Depending on a number of variables, these assumptions may not always be right.
WebSolutions replied on at Permalink Reply
WebSolutions
Also, I have noticed that even when the product dimensions are turned off, the whole payment process goes through, but the order isn't created, nor is the email generated to the customer and to us.

When I deactivated UPS shipping and reactivated basic shipping, it did create the order fine and sent the emails.

thanks
tbcrowe replied on at Permalink Reply
tbcrowe
I'm not sure if I suggested this before - have you checked the Concrete5 log to see if there are any errors in it? Go to Dashboard > Reports > Logs. Often times errors relating to shipping by dimension will appear there. If you don't see anything there, please let me know; I'll create a new version of the package with more logging.
WebSolutions replied on at Permalink Reply
WebSolutions
Yes, there is quite a bit of information here:


An error occured while trying to obtain UPS shipping rates for order #16 -
---> error #111035: The maximum per package weight for the selected service from the selected country is 150 pounds.


This seems to be prevalent, along with:


Invalid payment. Requested $28.88, got $


None of the products are over 150 lbs. My assumption is also that the payment issue is causing the order not to go through.
tbcrowe replied on at Permalink Reply
tbcrowe
Aha! Check your maximum box size. You probably have a very large box size there. The module uses that size to estimate shipping for groups of packages. If that box is very large it will end up with a weight over 150 pounds and that will produce the error you are seeing. If you're shipping regular items your maximum box size should probably be around 14x18x14 inches (or the equivalent in cm).

The payment error is an unrelated error. Are you using the Paypal method? I believe there was a fix to that in 1.7.4 that might be related that error.
WebSolutions replied on at Permalink Reply
WebSolutions
The max size was 10x10x10 in. Do you mean that the error is suggesting that it's too too small or too big?

Here are my settings (ups settings erased of course, and is set to not active because we went back to basic shipping to fix the orders not going through)

http://ns1.whethamsolutions.com/~wmwpump/screen1.png...


Also, the eCommerce package is up to date, and as soon as I deactivate the UPS shipping (and re-activate basic shipping), the orders go through.
tbcrowe replied on at Permalink Reply
tbcrowe
I need to see the raw request and response to sort out what's going on. If you don't mind editing (make a copy first) the packages/core_commerce_ups/models/core_commerce/shipping/types/ups/controller.php file, find the line with the call to performRequest (line 262) below and add the line on either side of as shown:
Log::addEntry('UPS Request: '.var_export($out_xml,1));
$result = self::performRequest('Rate', $out_xml);
Log::addEntry('UPS Response: '.var_export($result,1));

Then go through checkout again with UPS shipping enabled, go to your Concrete logs and please email me one pair of "UPS Request"/"UPS Response" logs.

If you'd rather not modify the file directly, please email me your email address to: croweweb at embarqmail doc com. I'll send you a copy of the package with the code changes.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.