If this is your first visit, check our documentation. To post, register or login.
Forums / Bug Reports / Sending out product notification: Cannot use object of type queryFactoryResult

Sending out product notification: Cannot use object of type queryFactoryResult

Locked

Started by navido on 10 Nov 2009, 12:20 PM · Views: 1,463

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,512
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']);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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,512
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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.