Post by mkofirearms » Fri Feb 16, 2018 3:22 am

i'm having same trouble with fedex as OP did om vrsion 3.0.2.0
I corrected the URL in fedex.php and lines in fedex.twig. uninstalled, cleared cash, restarted, etc as per instructions.
however i still having trouble. Services checkbox selections still don't stay selected in fedex setup module.
from website checkout page i get " Warning: No Shipping options are available."

from admin side OC logs getting this message:

2018-02-15 19:14:33 - PHP Warning: in_array() expects parameter 2 to be array, null given in /.../.../public_html/catalog/model/extension/shipping/fedex.php on line 180

line 180 consists of:

if (in_array(strtoupper($code), $this->config->get('shipping_fedex_service'))) {
$title = $this->language->get('text_' . $code);

$delivery_time_stamp = $rate_reply_detail->getElementsByTagName('DeliveryTimestamp');

if ($this->config->get('shipping_fedex_display_time') && $delivery_time_stamp->length) {
$title .= ' (' . $this->language->get('text_eta') . ' ' . date($this->language->get('date_format_short') . ' ' . $this->language->get('time_format'), strtotime($delivery_time_stamp->item(0)->nodeValue)) . ')';
}

$rated_shipment_details = $rate_reply_detail->getElementsByTagName('RatedShipmentDetails');

foreach ($rated_shipment_details as $rated_shipment_detail) {
$shipment_rate_detail = $rated_shipment_detail->getElementsByTagName('ShipmentRateDetail')->item(0);
$shipment_rate_detail_type = explode('_', $shipment_rate_detail->getElementsByTagName('RateType')->item(0)->nodeValue);

if (count($shipment_rate_detail_type) == 3 && $shipment_rate_detail_type[1] == $this->config->get('shipping_fedex_rate_type')) {
$total_net_charge = $shipment_rate_detail->getElementsByTagName('TotalNetCharge')->item(0);

break;
}
}

$cost = $total_net_charge->getElementsByTagName('Amount')->item(0)->nodeValue;

$currency = $total_net_charge->getElementsByTagName('Currency')->item(0)->nodeValue;

$quote_data[$code] = array(
'code' => 'fedex.' . $code,
'title' => $title,
'cost' => $this->currency->convert($cost, $currency, $this->config->get('config_currency')),
'tax_class_id' => $this->config->get('shipping_fedex_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $currency, $this->session->data['currency']), $this->config->get('shipping_fedex_tax_class_id'), $this->config->get('config_tax')), $this->session->data['currency'], 1.0000000)
);
}

I see the problem is in parameter 2 but which one of these is parameter 2?

my fedex.php

Image

my fedex.twig

Image

Newbie

Posts

Joined
Wed Feb 14, 2018 5:12 am

Post by AllenFreeman » Sun Mar 04, 2018 2:06 am

I'm having the same issue as described, and I have carefully implemented all of the steps outlined above as stated (edited fedex.twig and fedex.php, cleared cache, restarted, etc.)

The Services checkboxes within the fedex extension still won't stay checked.

And when I do test order, I get the red ERROR. Log below.

Any advice would be appreciated. Thx!

Error log:
2018-03-03 17:56:54 - FEDEX :: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelop ... :RateReply xmlns:v10="http://fedex.com/ws/rate/v10"> <v10:HighestSeverity xmlns:v10="http://fedex.com/ws/rate/v10">ERROR</v1 ... stSeverity> <v10:Notifications xmlns:v10="http://fedex.com/ws/rate/v10"> <v10:Severity xmlns:v10="http://fedex.com/ws/rate/v10">ERROR</v10:Severity> <v10:Source xmlns:v10="http://fedex.com/ws/rate/v10">prof</v10:Source> <v10:Code xmlns:v10="http://fedex.com/ws/rate/v10">1000</v10:Code> <v10:Message xmlns:v10="http://fedex.com/ws/rate/v10">Authentication Failed</v10:Message> </v10:Notifications> <v10:Version xmlns:v10="http://fedex.com/ws/rate/v10"> <v10:ServiceId xmlns:v10="http://fedex.com/ws/rate/v10">crs</v10:ServiceId> <v10:Major xmlns:v10="http://fedex.com/ws/rate/v10">10</v10:Major> <v10:Intermediate xmlns:v10="http://fedex.com/ws/rate/v10">0</v10:Intermediate> <v10:Minor xmlns:v10="http://fedex.com/ws/rate/v10">0</v10:Minor> </v10:Version> </v10:RateReply></SOAP-ENV:Body></SOAP-ENV:Envelope>

Newbie

Posts

Joined
Tue Feb 20, 2018 10:18 pm

Post by AllenFreeman » Tue Mar 06, 2018 9:46 am

I have followed the instructions in this thread for corrections to fedex.twig and fedex.php. Both issues were found, corrected, uploaded. Installed as instructed, cleared cache, maintenance refresh, etc. The Fedex connection is correct with meter/key/pw.

But the doggone Services checkboxes won't stay checked!

The only error log message I'm getting is about line 355, which is that no services have been designated.

I'm using v3.0.2.0. Might anything in this version be different from the time when straightlight posted the original solution?

Thanks in advance for any suggestions...

--AllenFreeman

Newbie

Posts

Joined
Tue Feb 20, 2018 10:18 pm

Post by Bunny168 » Wed Apr 04, 2018 7:35 am

I also followed the instructions in this thread for corrections to fedex.twig and fedex.php.
Confirmed with FedEx web services support that both URLs works and there's no need to modify fedex.php
FedEx is getting the request from my site and sending the quote back.
However, I'm getting these error (which can be found in the OC error log):
Warning: in_array() expects parameter 2 to be array, null given in . . . . . catalog/model/extension/shipping/fedex.php on line 180
My OC version is 3.0.2.0. Not sure if this is related to my recent site migration from http to https
Seems like the problem is on the OC side.
Please help

Newbie

Posts

Joined
Tue Aug 22, 2017 6:45 am

Post by straightlight » Wed Apr 04, 2018 6:47 pm

My OC version is 3.0.2.0. Not sure if this is related to my recent site migration from http to https
Seems like the problem is on the OC side.
What are the web access logs reporting about fedex.php file when using https?

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ssrw » Tue Jun 19, 2018 6:54 pm

We have also followed the instructions in this thread and it HAS NOT resolved the issue.

Is there any update on this?

This is somewhat time-urgent for us.

Thanks in advance.

Newbie

Posts

Joined
Thu Jul 27, 2017 10:17 pm

Post by MajorPain » Wed Jul 11, 2018 5:58 am

I also did a new install andsetup fedex module.
Made the changes to both files and I also get the error on checkout.

Code: Select all

Warning: in_array() expects parameter 2 to be array, null given in /home/valleybee/store2.valleybeekeeping.com/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home/valleybee/store2.valleybeekeeping.com/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home/valleybee/store2.valleybeekeeping.com/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home/valleybee/store2.valleybeekeeping.com/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home/valleybee/store2.valleybeekeeping.com/catalog/model/extension/shipping/fedex.php on line 180

Newbie

Posts

Joined
Mon Jul 09, 2018 9:05 am

Post by Garden of Mirth » Tue Aug 07, 2018 11:58 pm

Followed instructions to the letter. FedEx selections will not stay selected and when testing all I get is that big red ERROR on the page. Nothing here seems to work and there's been no new answers. Has anyone had any success figuring this out? FedEx needs to be a shipping option.


Posts

Joined
Sun Aug 05, 2018 6:41 am

Post by straightlight » Wed Aug 08, 2018 12:57 am

Garden of Mirth wrote:
Tue Aug 07, 2018 11:58 pm
Followed instructions to the letter. FedEx selections will not stay selected and when testing all I get is that big red ERROR on the page. Nothing here seems to work and there's been no new answers. Has anyone had any success figuring this out? FedEx needs to be a shipping option.
Incomplete information provided, more information is needed. Forum rules unfollowed.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 9 guests