Post by jdahlstrom68 » Thu Sep 28, 2017 11:01 pm

I've enabled FedEx shipping on 3.0.2 and for some reason my service selections aren't being saved. When checking out, I get an error "Warning: No Shipping options are available. Please contact us for assistance!"

The error log is showing
2017-09-28 14:57:28 - PHP Warning: in_array() expects parameter 2 to be array, null given in /.../.../.../catalog/model/extension/shipping/fedex.php on line 180

I'm guessing this is because my shipping service selections aren't being saved. Anyone have a suggestion on how to fix this?

Newbie

Posts

Joined
Sat Sep 09, 2017 2:13 am

Post by straightlight » Fri Sep 29, 2017 12:48 am

When going back to your admin fedex shipping module, do you see any entries after saving the form previously?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 jdahlstrom68 » Fri Sep 29, 2017 1:57 am

All of the other settings are saved. It's only the Services selections that aren't checked when I edit the settings again.

I went back to check the code in the line error and this is where it's happening. Looks like I'm having an issue with my zones I guess. I'm pretty sure I have everything selected as I should, but I'm going to run back through to see if I can find anything I missed.

Code: Select all

			if (in_array($country_info['iso_code_2'], array('US', 'CA'))) {

				$xml .= '						<ns1:StateOrProvinceCode>' . ($zone_info ? $zone_info['code'] : '') . '</ns1:StateOrProvinceCode>';

			} else {

				$xml .= '						<ns1:StateOrProvinceCode></ns1:StateOrProvinceCode>';

			}

Newbie

Posts

Joined
Sat Sep 09, 2017 2:13 am

Post by straightlight » Fri Sep 29, 2017 2:22 am

Bug found.

1 - Take a screenshot of your admin fedex shipping settings.
2 - If using a production store, put your site under maintenance. Then, uninstall the fedex shipping module.
3 - In your admin/view/template/extension/shipping/fedex.twig file, find:

Code: Select all

<input type="checkbox" name="fedex_service[]" value="{{ service.value }}" checked="checked" />
                    {{ service.text }}
                    {% else %}
                    <input type="checkbox" name="fedex_service[]" value="{{ service.value }}" />
replace with:

Code: Select all

<input type="checkbox" name="shipping_fedex_service[]" value="{{ service.value }}" checked="checked" />
                    {{ service.text }}
                    {% else %}
                    <input type="checkbox" name="shipping_fedex_service[]" value="{{ service.value }}" />
 
4 - Reinstall and reconfigure your shipping fedex settings in the admin. Then, save your settings.
5 - Log out from the admin.
6 - Clear the Opencart cache and browsing cache. Close the browser, re-open and see if the settings are saved into the admin shipping settings page this time and see if the error still persists on the checkout-end.
7 - Disable maintenance mode.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 jdahlstrom68 » Fri Sep 29, 2017 2:37 am

We've got a winner!!! Thanks so much for your help! ;D

Oh, I also had to update the FedEx urls too.

Newbie

Posts

Joined
Sat Sep 09, 2017 2:13 am

Post by straightlight » Fri Sep 29, 2017 2:44 am

No problem. As for the URL, if you're referring to the sandbox and live URL for the Fedex API, could you provide the two new URLs?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 jdahlstrom68 » Fri Sep 29, 2017 2:53 am

FedEx sent different URLs for both testing and production settings with my keys. When I changed them my original error went away and then the Services checkboxes became the only issue.

test url: https://wsbeta.fedex.com:443/web-services
production url: https://ws.fedex.com:443/web-services

Newbie

Posts

Joined
Sat Sep 09, 2017 2:13 am

Post by straightlight » Fri Sep 29, 2017 3:01 am

For users encountering issues with the URL in the future, in your catalog/model/extension/shipping/fedex.php file,

find:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://gateway.fedex.com/web-services/';
			} else {
				$url = 'https://gatewaybeta.fedex.com/web-services/';
			}
replace with:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://ws.fedex.com:443/web-services/';
			} else {
				$url = 'https://wsbeta.fedex.com:443/web-services/';
			}
This should resolved the problem.

@jdahlstrom68 thanks for reporting the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 misterzorik » Fri Jan 26, 2018 1:45 pm

I did this but still not working on version 3.0.0.0
I dont know why, it doesnt allow my to select the services and it shows RED ERROR in front end

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by misterzorik » Fri Jan 26, 2018 4:59 pm

I did the both steps but yet the services are not getting saved
and i get these error:
Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180

please help me
i use version 3.0.2.0

straightlight wrote:
Fri Sep 29, 2017 3:01 am
For users encountering issues with the URL in the future, in your catalog/model/extension/shipping/fedex.php file,

find:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://gateway.fedex.com/web-services/';
			} else {
				$url = 'https://gatewaybeta.fedex.com/web-services/';
			}
replace with:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://ws.fedex.com:443/web-services/';
			} else {
				$url = 'https://wsbeta.fedex.com:443/web-services/';
			}
This should resolved the problem.

@jdahlstrom68 thanks for reporting the issue.

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by straightlight » Sat Jan 27, 2018 7:06 am

What is on line 180 of that file?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 misterzorik » Sat Jan 27, 2018 10:59 pm

misterzorik wrote:
Fri Jan 26, 2018 4:59 pm
I did the both steps but yet the services are not getting saved
and i get these error:
Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180Warning: in_array() expects parameter 2 to be array, null given in /home1/ab41425/public_html/farsticket.com/open/catalog/model/extension/shipping/fedex.php on line 180

please help me
i use version 3.0.2.0

straightlight wrote:
Fri Sep 29, 2017 3:01 am
For users encountering issues with the URL in the future, in your catalog/model/extension/shipping/fedex.php file,

find:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://gateway.fedex.com/web-services/';
			} else {
				$url = 'https://gatewaybeta.fedex.com/web-services/';
			}
replace with:

Code: Select all

if (!$this->config->get('shipping_fedex_test')) {
				$url = 'https://ws.fedex.com:443/web-services/';
			} else {
				$url = 'https://wsbeta.fedex.com:443/web-services/';
			}
This should resolved the problem.

@jdahlstrom68 thanks for reporting the issue.
links are changed to ws.fedex and wsbeta.fedex but yet not working could the issue be with fedex self?

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by straightlight » Sun Jan 28, 2018 9:23 pm

straightlight wrote:
Sat Jan 27, 2018 7:06 am
What is on line 180 of that file?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by 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 misterzorik » Tue Jan 30, 2018 6:37 am

Dear Opencart Members,
I did install a complete new installation of opencart v3.0.0.0 with new database and all
I did go through all the steps mentioned in this topic. I was able to save the shipping service values.
I did change the server links of fedex to the new ones said in this topic too.
But after all i still do get the error (Just simple ERROR word in RED letters).
Can you guys please help me?
my link is: http://glow-ball.com/v300/
try to order the iphone only as i have only set size and weight you can find it with this link:
http://glow-ball.com/v300/index.php?rou ... duct_id=40

This is how I get the error:
Please select the preferred shipping method to use on this order.
Flat Rate
Flat Shipping Rate - $5.00
Fedex
ERROR
Can you guys help me fix this error?
Is anyone willing to help me? I can give access to FTP and admin panel if needed.

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by bala » Wed Feb 07, 2018 2:58 pm

misterzorik wrote:
Tue Jan 30, 2018 6:37 am
Dear Opencart Members,
I did install a complete new installation of opencart v3.0.0.0 with new database and all
I did go through all the steps mentioned in this topic. I was able to save the shipping service values.
I did change the server links of fedex to the new ones said in this topic too.
But after all i still do get the error (Just simple ERROR word in RED letters).
Can you guys please help me?
my link is: http://glow-ball.com/v300/
try to order the iphone only as i have only set size and weight you can find it with this link:
http://glow-ball.com/v300/index.php?rou ... duct_id=40

This is how I get the error:
Please select the preferred shipping method to use on this order.
Flat Rate
Flat Shipping Rate - $5.00
Fedex
ERROR
Can you guys help me fix this error?
Is anyone willing to help me? I can give access to FTP and admin panel if needed.
I logged into your link, i find your issues on fedex shipping are resolved. Can you please help me. I am using opencart 3.0.2.0
Please find the attachments.

Attachments

fedex-resolved.png

fedex-resolved.png (35.58 KiB) Viewed 2646 times

fedex-error.png

fedex-error.png (44.55 KiB) Viewed 2646 times


Newbie

Posts

Joined
Wed Feb 07, 2018 12:36 pm

Post by misterzorik » Wed Feb 14, 2018 10:49 pm

bala wrote:
Wed Feb 07, 2018 2:58 pm
misterzorik wrote:
Tue Jan 30, 2018 6:37 am
Dear Opencart Members,
I did install a complete new installation of opencart v3.0.0.0 with new database and all
I did go through all the steps mentioned in this topic. I was able to save the shipping service values.
I did change the server links of fedex to the new ones said in this topic too.
But after all i still do get the error (Just simple ERROR word in RED letters).
Can you guys please help me?
my link is: http://glow-ball.com/v300/
try to order the iphone only as i have only set size and weight you can find it with this link:
http://glow-ball.com/v300/index.php?rou ... duct_id=40

This is how I get the error:
Please select the preferred shipping method to use on this order.
Flat Rate
Flat Shipping Rate - $5.00
Fedex
ERROR
Can you guys help me fix this error?
Is anyone willing to help me? I can give access to FTP and admin panel if needed.
I logged into your link, i find your issues on fedex shipping are resolved. Can you please help me. I am using opencart 3.0.2.0
Please find the attachments.
Yes I can help you. Now I know everything from FEDEX issue as i spent a week time for this.
tell me what is your problem and i will help you

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by bala » Thu Feb 15, 2018 1:55 pm

Please help me
1. to get Production key in Fedex Account, I was not able to proceed and complete my last step of Fedex Registration.
2. Fedex option shows me "ERROR" red color in shipping module.
3. Please find the attachments for your understanding.

Attachments

fedex-error.png

fedex-error.png (44.55 KiB) Viewed 2555 times


Newbie

Posts

Joined
Wed Feb 07, 2018 12:36 pm

Post by misterzorik » Thu Feb 15, 2018 7:56 pm

bala wrote:
Thu Feb 15, 2018 1:55 pm
Please help me
1. to get Production key in Fedex Account, I was not able to proceed and complete my last step of Fedex Registration.
2. Fedex option shows me "ERROR" red color in shipping module.
3. Please find the attachments for your understanding.
Which country are you from?
which version do you use?
you must complete registeration with FEDEX otherwise it wont work!!!!

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am

Post by bala » Thu Feb 15, 2018 8:15 pm

I am a developer from India but my client is from California.
I am looking for Fedex Account with California details.
At my last step of registration, it shows me that the account details does not the records.
Unable to get the production key because of that issue.
Please help me.

Newbie

Posts

Joined
Wed Feb 07, 2018 12:36 pm

Post by misterzorik » Thu Feb 15, 2018 8:23 pm

bala wrote:
Thu Feb 15, 2018 8:15 pm
I am a developer from India but my client is from California.
I am looking for Fedex Account with California details.
At my last step of registration, it shows me that the account details does not the records.
Unable to get the production key because of that issue.
Please help me.
That is an issue for fedex not OC.
please contact them. they have a very good email support system. they answer within 24 hours.

New member

Posts

Joined
Sat Jan 20, 2018 3:47 am
Who is online

Users browsing this forum: No registered users and 8 guests