Post by yeayang » Tue Nov 21, 2023 10:13 am

Hello all,
Warning messages occur after install the PayPal Checkout Integration, OC v3.0.3.8
Notice: Undefined index: in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33
Notice: Trying to access array offset on value of type null in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33

how to solve the problem? thanks.

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by Cue4cheap » Tue Nov 21, 2023 12:34 pm

yeayang wrote:
Tue Nov 21, 2023 10:13 am
Hello all,
Warning messages occur after install the PayPal Checkout Integration, OC v3.0.3.8
Notice: Undefined index: in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33
Notice: Trying to access array offset on value of type null in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33

how to solve the problem? thanks.
What is your PHP version?
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by yeayang » Tue Nov 21, 2023 4:12 pm

Cue4cheap wrote:
Tue Nov 21, 2023 12:34 pm
yeayang wrote:
Tue Nov 21, 2023 10:13 am
Hello all,
Warning messages occur after install the PayPal Checkout Integration, OC v3.0.3.8
Notice: Undefined index: in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33
Notice: Trying to access array offset on value of type null in
.../catalog/controller/extension/module/paypal_smart_button.php on line 33

how to solve the problem? thanks.
What is your PHP version?
Mike
Hello Mike,
thanks for your reply, my PHP version is PHP 7.4

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by ADD Creative » Tue Nov 21, 2023 5:58 pm

What version of the Payment extension are you using?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yeayang » Tue Nov 21, 2023 6:04 pm

ADD Creative wrote:
Tue Nov 21, 2023 5:58 pm
What version of the Payment extension are you using?
Hello, thanks for replying.
PayPal Checkout Integration, paypal_commerce_platform v2.1.0

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by ADD Creative » Tue Nov 21, 2023 6:51 pm

There is no catalog/controller/extension/module/paypal_smart_button.php file in that version. Maybe you have some old files or settings left over from a previous version or it's from a different extension.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yeayang » Tue Nov 21, 2023 7:18 pm

ADD Creative wrote:
Tue Nov 21, 2023 6:51 pm
There is no catalog/controller/extension/module/paypal_smart_button.php file in that version. Maybe you have some old files or settings left over from a previous version or it's from a different extension.
thank you for answering.
I've deleted this paypal_smart_button.php file directly, and the shop seems work normal now.
is this a workable solution?
thanks.

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by ADD Creative » Tue Nov 21, 2023 7:37 pm

The file on it's own wouldn't cause the issue. Check your Design -> Layouts. Maybe the PayPal Smart Button was still being used in a layout. You may have to put the file back to see it.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yeayang » Tue Nov 21, 2023 9:30 pm

ADD Creative wrote:
Tue Nov 21, 2023 7:37 pm
The file on it's own wouldn't cause the issue. Check your Design -> Layouts. Maybe the PayPal Smart Button was still being used in a layout. You may have to put the file back to see it.
warning messages exist again after I put the file back, is there other solutions not to show the warning messages?

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by paulfeakins » Wed Nov 22, 2023 12:01 am

yeayang wrote:
Tue Nov 21, 2023 10:13 am
Warning messages occur after install the PayPal Checkout Integration, OC v3.0.3.8
Contact the extension developer.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ADD Creative » Wed Nov 22, 2023 1:26 am

yeayang wrote:
Tue Nov 21, 2023 9:30 pm
ADD Creative wrote:
Tue Nov 21, 2023 7:37 pm
The file on it's own wouldn't cause the issue. Check your Design -> Layouts. Maybe the PayPal Smart Button was still being used in a layout. You may have to put the file back to see it.
warning messages exist again after I put the file back, is there other solutions not to show the warning messages?
Where do you see the error? After you put the file back did you check all you layouts in Design -> Layouts to check the PayPal Smart Button was still being used?

If you have checked the layouts and are sure you have all the latest files, then it is probably fine to delete the file. After you do check both the PHP and OpenCart error logs for any related errors.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yeayang » Wed Nov 22, 2023 1:52 am

paulfeakins wrote:
Wed Nov 22, 2023 12:01 am
yeayang wrote:
Tue Nov 21, 2023 10:13 am
Warning messages occur after install the PayPal Checkout Integration, OC v3.0.3.8
Contact the extension developer.
ok, thank you so much!

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by yeayang » Wed Nov 22, 2023 3:26 pm

ADD Creative wrote:
Wed Nov 22, 2023 1:26 am
yeayang wrote:
Tue Nov 21, 2023 9:30 pm
ADD Creative wrote:
Tue Nov 21, 2023 7:37 pm
The file on it's own wouldn't cause the issue. Check your Design -> Layouts. Maybe the PayPal Smart Button was still being used in a layout. You may have to put the file back to see it.
warning messages exist again after I put the file back, is there other solutions not to show the warning messages?
Where do you see the error? After you put the file back did you check all you layouts in Design -> Layouts to check the PayPal Smart Button was still being used?

If you have checked the layouts and are sure you have all the latest files, then it is probably fine to delete the file. After you do check both the PHP and OpenCart error logs for any related errors.
thanks for replying.
error info shows on the top of website.
sorry I don't know how to 'check the PayPal Smart Button was still being used' how should I know whether it is being used or not? :)
the website seems work normally after I delete this file, but just a bit worry that I don't know if this will affect anywhere else of the site.
thanks!

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by ADD Creative » Wed Nov 22, 2023 5:40 pm

In you admin goto Design -> Layouts. Then click the edit button for a layout. Then check if the for the PayPal Smart Button in any of the 4 module positions. Do this for all the layouts.

Or you can search the code column in the database table oc_layout_module for paypal_smart_button.

Removing the file without removing the module from the layouts will likely cause a error on PHP 8.1 and above.

If you are seeing error on the top of your website and it's a live store, you need to switch of displaying of errors (this has to be done with 3 different settings).

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by yeayang » Sun Nov 26, 2023 9:08 pm

ADD Creative wrote:
Wed Nov 22, 2023 5:40 pm
In you admin goto Design -> Layouts. Then click the edit button for a layout. Then check if the for the PayPal Smart Button in any of the 4 module positions. Do this for all the layouts.

Or you can search the code column in the database table oc_layout_module for paypal_smart_button.

Removing the file without removing the module from the layouts will likely cause a error on PHP 8.1 and above.

If you are seeing error on the top of your website and it's a live store, you need to switch of displaying of errors (this has to be done with 3 different settings).
dear, how to switch off displaying errors? :)

Newbie

Posts

Joined
Mon Sep 03, 2018 6:52 pm

Post by ADD Creative » Mon Nov 27, 2023 5:37 pm

If it's a production site make sure make sure display errors in set to off in all 3 places it needs to be. Your PHP settings, in system/config/default.php and in the settings.

1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.

2. In system/config/default.php set error_display to false (2.2.x and above).

3. In your OpenCart Setting on the server tab set Display Errors to No.

You then need to check both your PHP and OpenCart error logs for the errors.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 39 guests