Zen Cart Logo
Forums / Bug Reports / Sending out product notification: Cannot use object of type queryFactoryResult

Sending out product notification: Cannot use object of type queryFactoryResult

Locked

Views: 1,454

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
10 Nov 2009, 12:20 PM
#1
navido avatar

navido

Zen Follower

Join Date:
Sep 2008
Posts:
221
Plugin Contributions:
0

Sending out product notification: Cannot use object of type queryFactoryResult

Hello

I really need help on this.

I created a product notification text and clicked on send but i got this error in admin:

Fatal error: Cannot use object of type queryFactoryResult as array in /home/fotonavi/public_html/admin/includes/modules/newsletters/product_notification.php on line 219

I copied line 216-219 below:

while (!$customers->EOF) {
          $audience[$customers->fields['customers_id']] = array('firstname' => $customers->fields['customers_firstname'],
                                                        'lastname' => $customers->fields['customers_lastname'],
                                                        'email_address' => $customers['customers_email_address']);

I use v1.3.8a
PHP Version 5.2.9
Mysql Client API version 5.1.30

This information from Admin-Tools- serverinformation

Please help:(

10 Nov 2009, 2:18 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sending out product notification: Cannot use object of type queryFactoryResult

There's a typo in the code there. Fix it like this:```
while (!$customers->EOF) {
$audience[$customers->fields['customers_id']] = array('firstname' => $customers->fields['customers_firstname'],
'lastname' => $customers->fields['customers_lastname'],
'email_address' => $customers[B]->fields[/B]['customers_email_address']);

10 Nov 2009, 3:46 PM
#3
navido avatar

navido

Zen Follower

Join Date:
Sep 2008
Posts:
221
Plugin Contributions:
0

Re: Sending out product notification: Cannot use object of type queryFactoryResult

DrByte:

There's a typo in the code there. Fix it like this:```
while (!$customers->EOF) {
$audience[$customers->fields['customers_id']] = array('firstname' => $customers->fields['customers_firstname'],
'lastname' => $customers->fields['customers_lastname'],
'email_address' => $customers[B]->fields[/B]['customers_email_address']);


DrByte, thank you a lot for taking time to respond. I appreciate it. That was the fix, correct. 
:clap:
11 Nov 2009, 3:37 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sending out product notification: Cannot use object of type queryFactoryResult

Thanks for confirming.
The fix will be included in the next release.