Zen Cart Logo
Forums / General Questions / PHP fatal error and blank main_page=checkout_confirmation

PHP fatal error and blank main_page=checkout_confirmation

Views: 692

Results 1 to 5 of 5
7 May 2015, 11:55 AM
#1
aro92 avatar

aro92

New Zenner

Join Date:
May 2015
Posts:
2
Plugin Contributions:
0

PHP fatal error and blank main_page=checkout_confirmation

I'm new to zen cart and can't seem to get my website working... using IDEAL as the only payment option.
I'm getting a blank page on payment and have come across a PHP fatal error in the error logs:

PHP Fatal error: Cannot use object of type mysqli_result as array in /shop/includes/modules/payment/sisowideal.php, referer: /shop/index.php?main_page=checkout_confirmation

and this is what it is directing me to:
$content = array();
foreach($order_products as $order_product) {
$content[]=$order_product['products_model'] . ' x ' . $order_product['products_quantity'];
}

The url is http://www. b o s r e c y c l i n g .nl/
Is there something that I have not done, and any idea on how to sort this?

7 May 2015, 12:04 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: PHP fatal error and blank main_page=checkout_confirmation

Apparently $order_products is set to a return value of a mysqli_result and is not further processed to provide/create it as an array. The function foreach (x as y) expects x to be an array.

Need to use a loop checking if at the end of the "file". If not, then do action, move to the next record and continue until all records have been processed.

7 May 2015, 12:12 PM
#3
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: PHP fatal error and blank main_page=checkout_confirmation

The sisow module has IMHO always been a little buggy. I prefer using this module for sisow instead.
If you give me a link to the siow module you used, I can take a look at it and maybe fix it

7 May 2015, 12:22 PM
#4
aro92 avatar

aro92

New Zenner

Join Date:
May 2015
Posts:
2
Plugin Contributions:
0

Re: PHP fatal error and blank main_page=checkout_confirmation

Thanks for the swift reply!

Need to use a loop checking if at the end of the "file". If not, then do action, move to the next record and continue until all records have been processed.
Sorry for my ignorance but how would you do that?

7 May 2015, 12:45 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: PHP fatal error and blank main_page=checkout_confirmation

I think that what mc12345678 meant is:

$content = array();
while (!$order_products->EOF) {
  $content[]=$order_products->fields['products_model'] . ' x ' . $order_products->fields['products_quantity'];
  $order_products->MoveNext();
}