Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer error


friebj99

Recommended Posts

After recently doing some updates to our site, I came across this problem in the back-end of our site in the Admin panel. When I go to customers and then click on a customer it doesn't retrieve the customers information from the database. This is the error that I am receiving. I have looked at the object_info.php file and its only function is to reset the array I believe.

 

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/amntajfb/public_html/strattapparel.com/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/amntajfb/public_html/strattapparel.com/admin/includes/classes/object_info.php on line 18

 

 

If anyone has any insight on this problem that would be much appreciated!

 

Thanks,

Justin

Link to comment
Share on other sites

I have been comparing the file with an original file. I'm not able to find any differences. I think the root of the problem may because we had transferred customer information from our old database into our new site database. I'm not sure how this could have caused this error or how to fix it. Is there a way for me to post the code other than to just copy paste it?

Link to comment
Share on other sites

Was the old database from OSC too? If so, this shouldn't be the problem. Usually the function is used to create an object for customers, orders etc. which is filled by one or more database queries and then referneced for the output. In your case the object creation fails most likely because the return of the query is not an array. Check your database for empty entries.

Link to comment
Share on other sites

I have a feeling that it has something to do with me removing the option to select a country. I had another error before this one on line 733 in the customers.php file and had removed $country from the $customer_info array merge to get rid of that error.

 

The previous error before I took $country out was:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/amntajfb/public_html/strattapparel.com/admin/customers.php on line 733

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/amntajfb/public_html/strattapparel.com/admin/customers.php on line 735

 

Plus the error that I am currently trying to fix.

 

Hope this helps.

 

Thanks,

Justin

 

PS - If someone has an original customers.php file from the admin folder so I could look at it that would be great!

Link to comment
Share on other sites

Yeah that is where they were. When I remove $country from the array merge it gets rid of the error, so something with the country array must have been deleted. I was just looking at the customers table and there isn't even a country_id field. I have a feeling this may be the problem...

Link to comment
Share on other sites

$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...