So I am setting up the FedEx shipping and doing a test transaction and I get the following error:

Notice: Trying to get property of non-object in /home/aaquacks/public_html/store/catalog/model/shipping/fedex.php on line 178

Not sure what the issue is. Looking at that line, it looks like a blank line so guessing it's the line above it.


Also, Priority Overnight provides a estimated delivery date and time, but the FedEx Ground comes up with (Estimated Time: 31/12/1969 07:00:00 PM) .
Not sure why it's showing such an odd date. Before I changed my timezone from the default time zone, I believe the time was 01/01/1970 12:00:00AM.

Any ideas on the error and the messed up date and time?
Monday, August 22 2016, 10:41 PM
Share this post:
Responses (10)
  • Accepted Answer

    Wednesday, August 31 2016, 12:00 AM - #Permalink
    Sounds like the Ground alternative doesn't return a valid time, and the module has no error handling for it. So skip that alternative then, or start coding. :D
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 31 2016, 12:00 AM - #Permalink
    Sort of a fix:

    Disable "Display Delivery Time"

    And the error goes away.

    Seems the fedex module needs updating.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 11:57 PM - #Permalink
    Checked fedex.php and line 178 now shows something:

    							$title .= ' (' . $this->language->get('text_eta') . ' ' . date($this->language->get('date_format_short') . ' ' . $this->language->get('time_format'), strtotime($rate_reply_detail->getElementsByTagName('DeliveryTimestamp')->item(0)->nodeValue)) . ')';
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 11:57 PM - #Permalink
    Go into your settings and turn of the error reporting. This is just notices, they don't break anything.
    But yes, the shipping handling needs some love, and I have already added a issue for it: https://github.com/arastta/arastta/issues/528

    The Fedex module, and some others isn't made for this one page checkout, thus not perfect.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 11:56 PM - #Permalink
    Next, once I create an account and return to the checkout, no errors and no Fedex pricing.
    * This is because the store is still set to United Kingdom so this was expected.

    Changing to Canada as the country and returning to the checkout, the same error as before appears.

    Notice: Trying to get property of non-object in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 178
    Please select the preferred shipping method.

    Fedex

    Priority Overnight (Estimated Time: 31/08/2016 12:00:00 PM) - $54.04
    Fedex Ground (Estimated Time: 01/01/1970 12:00:00 AM) - $12.69

    The error and incorrect date on Fedex ground.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 11:51 PM - #Permalink
    Ok so I reinstalled the website, and installed the Fedex module.
    Inserted all my details into fedex module.

    I wanted to run a test transaction before I got to far, so I selected one of the demo products and added it to the cart and went to checkout.
    At this point I have no account so I have to create one, but immediately the Fedex shipping kicks out errors under shipping method.

    Notice: Undefined index: firstname in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 101Notice: Undefined index: lastname in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 101Notice: Undefined index: company in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 102Notice: Undefined index: address_1 in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 106Notice: Undefined index: company in /home/valleybee/public_html/store2/catalog/model/shipping/fedex.php on line 117
    Please select the preferred shipping method.

    Fedex

    ERROR


    I think the shipping method should actually be ignored until an account is actually created.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 10:50 PM - #Permalink
    Correct. Checked the file and that line was missing.
    Will test it out on a new install shortly.

    Thanks for the help.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 03:33 PM - #Permalink
    Rune Rasmussen wrote:

    This is line 178 in /catalog/model/shipping/fedex.php:
    							$title .= ' (' . $this->language->get('text_eta') . ' ' . date($this->language->get('date_format_short') . ' ' . $this->language->get('time_format'), strtotime($rate_reply_detail->getElementsByTagName('DeliveryTimestamp')->item(0)->nodeValue)) . ')';

    If it's blank in your install, it must be a faulty install I guess.
    I also believe the error message told more
    ...
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 03:30 PM - #Permalink
    Website info shows Curl is enabled.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 30 2016, 03:10 PM - #Permalink
    This is line 178 in /catalog/model/shipping/fedex.php:
    							$title .= ' (' . $this->language->get('text_eta') . ' ' . date($this->language->get('date_format_short') . ' ' . $this->language->get('time_format'), strtotime($rate_reply_detail->getElementsByTagName('DeliveryTimestamp')->item(0)->nodeValue)) . ')';

    If it's blank in your install, it must be a faulty install I guess.
    I also believe the error message told more ...

    Also check that you have cURL active on your server, among other things:https://arastta.org/docs/user-manual/tools/system-information
    The reply is currently minimized Show
Your Reply