Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

updating category name doesn't work


seventech

Recommended Posts

Hi,

 

I am fairly new to OSCommerce but I seem to have figured my way around most of it.

 

I am having some problems with an installation that was working fine and I can't think what has been changed.

 

When adding products I get the following errors when I try to preview it:

 

Warning: reset(): Passed variable is not an array or object in /usr/local/etc/httpd/htdocs/porta-charge.co.uk/osc/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/htdocs/porta-charge.co.uk/osc/admin/includes/classes/object_info.php on line 18

 

Also, it ignores changes I makwe to category names. I assume the problems are related.

 

I've been trying to get to the bottomof the problem updating category names as this seemed the easier one to debug and I thought it might lead to a solution for the other problem.

 

I've checked the SQL code exected on the DB as a result of an update and it updates the categorie name to '' (blank string) where category_id = 0 (even though that is not the id of the category)

 

Lines 61 and 62 of /admin/categories.php read

 

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
         $categories_name_array = $HTTP_POST_VARS['categories_name'];

 

I can't see how this could possibly pick up the category name as the form input filed is called 'category_name[1]' not 'category_name'. I understand that the 1 represents the language id but I don't see where categories.php is readin in this value from the post.

 

Any help would be greatly appreciated.

 

Thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...