If this is your first visit, check our documentation. To post, register or login.

Error when using PayPal button

Locked

Started by michelleodin on 19 Sep 2019, 8:08 PM · Views: 12,555

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
19 Sep 2019, 8:08 PM
#1
michelleodin avatar

michelleodin

New Zenner

Join Date:
Jul 2007
Posts:
41
Plugin Contributions:
0

Post #1 by michelleodin

[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]
I have an up to date version of zencart new install with responsive apparel boutique template with no other mods php 7 and all seems ok until a customer tries to checkout with PayPal Express, and all they get after pressing checkout with PayPal button is an error occurred please refresh the page or press the back button on a blank page
I've checked the logs and can't find anything in there about PayPal or checkout.
Does anyone know what could be wrong here I've been going round in circles and have the site in maintenance mode at the moment.
Thanks
Michelle

20 Sep 2019, 2:28 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #2 by mc12345678

Recommend being more specific with versions. As for the error message, if the files and folders are properly in place and permissions assigned then there should be a myDebug-log in the logs folder. (Sorry if knew that already but previous version nor upgrade history described.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2019, 7:02 PM
#3
michelleodin avatar

michelleodin

New Zenner

Join Date:
Jul 2007
Posts:
41
Plugin Contributions:
0

Post #3 by michelleodin

I am using the latest zencart v1.5.6c with fluorspar template with no other modifications. PHP 7.2
I reinstalled everything to a fresh database and changed my template to the one stated above and I still get the same server error when pressing either checkout button or paypal button
HTTP 500 internal Server Error
Most likely causes:
•The website is under maintenance.
•The website has a programming error.
Ive checked all my paypal setting and all is fine and correct, ive done fresh installs several times only to get the same paypal error when the checkout button is pressed, everything else works fine.
Can someone point me in the direction of possible causes please as im lost and have been trying to sort this for several weeks and have lost several orders.
I've checked the log files but I don't understand what it all means.
My website is https://www.odinsminiatures.com
Any help would be welcome
Thanks in advance
michelle

14 Oct 2019, 7:26 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #4 by dbltoe

You need to advise your host of the 500 error.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

15 Oct 2019, 10:04 AM
#5
michelleodin avatar

michelleodin

New Zenner

Join Date:
Jul 2007
Posts:
41
Plugin Contributions:
0

Post #5 by michelleodin

i advised my host of the 500 error. They did a few alterations and things are a little better but not fully fixed.
The internal error has gone and customers can use the paypal button and the orders complete. But I am receiving 2 order notifications from the same customer but payment is only being taken once.
The other problem is the checkout button, if a customer presses this instead of the paypal button after creating an account on the shopping cart page it take them to a blank page with the following URL http://www.odinsminiatures.com/odinsminiatureshop/index.php?main_page=checkout_shipping
pressing the back button takes them back to the shopping cart.
the following is the log file created after I tried to checkout as a customer

[15-Oct-2019 08:23:01 Europe/London] Request URI: /odinsminiatureshop/index.php?main_page=cookie_usage, IP address: 46.229.168.162
#1 sizeof() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_mega_menu.php:112]
#2 require(/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_mega_menu.php) called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_header.php:107]
#3 require(/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_header.php) called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_main_page.php:141]
#4 require(/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_main_page.php) called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/index.php:98]
--> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/templates/fluorspar/common/tpl_mega_menu.php on line 112.

I don't understand what this is saying could someone help me please
thank you

Also when I try to update an order to dispatched I get the following error

WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

If I press the back button the order has been updated to dispatched.

15 Oct 2019, 11:17 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #6 by mc12345678

That error message is indicating that the variable that is being used in includes/templates/fluorspar/common/tpl_mega_menu.php on line 112 was not initialized as an empty array before attempting to run a for or foreach loop. Or that loop should have been bypassed because of absent information.

For the admin issue, there should be a myDEBUG-adm error log to identify the problem. If posting that log, please obscure your admin directory name as it will appear in that file.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Oct 2019, 7:46 PM
#7
michelleodin avatar

michelleodin

New Zenner

Join Date:
Jul 2007
Posts:
41
Plugin Contributions:
0

Post #7 by michelleodin

Thank you for your reply
i have looked at the file as described above and have posted it below.
But i really do not understand or know what it means, i do remember changing this file to edit the menu title so could i have edited/deleted something i should not have done.
i really dont mean to sound dumb i just cant understand coding, i am able to follow instructions to edit code/put it right etc but thats about my limit. Ireally do apphreciate you taking the time to try and help me.

the code on line 112 in includes/templates/fluorspar/common/tpl_mega_menu.php is as follows:

for ($i=0;$i<sizeof($manufacturer_sidebox_array);$i++) {
$content = '';

the admin log file is as follows:

[15-Oct-2019 11:08:53 Europe/London] Request URI: /odinsminiatureshop/xxxxxxx/orders.php?page=1&oID=35967&action=update_order, IP address: 80.225.150.3
#1 trigger_error() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/xxxxxxx/includes/functions/database.php:51]
#5 zen_db_perform() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/functions/functions_osh_update.php:186]
#6 zen_update_orders_history() called at [/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/xxxxxxx/orders.php:158]
--> PHP Fatal error: 1054:Unknown column 'updated_by' in 'field list' :: insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments, updated_by) values ('35967', '3', now(), '1', '', 'michelle [1]') ==> (as called by) /home/sites/odinsminiatures.com/public_html/odinsminiatureshop/xxxxxxx/includes/functions/database.php on line 51 <== in /home/sites/odinsminiatures.com/public_html/odinsminiatureshop/includes/classes/db/mysql/query_factory.php on line 171.

thanks once again for the help

15 Oct 2019, 10:22 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #8 by mc12345678

For the first issue, look around line 45 of includes/modules/sideboxes/manufacturers.php

There is probably the following assignment:

$manufacturer_sidebox_array##=##'';

Which should be changed to:

$manufacturer_sidebox_array##=##array();

For the second issue, it appears that part of the install/upgrade script did not get executed. This became a known issue somewhere around the release of 1.5.6a I think it was. An indication of an install problem was to try to access the configuration section of the admin. If an error occurs, then the upgrade portion of the zc_install process did not successfully complete.

It would also be possible to just insert the one field that is/was missing from the database, but others may still be affected.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...