Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

after install Header Tags Controller v2.3.7


peteravu

Recommended Posts

Posted

After install Header Tags Controller v2.3.7 I get this error when updating products and click preview

Warning: reset(): Passed variable is not an array or object in c:\programmer\easyphp1-7\www\catalog\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in c:\programmer\easyphp1-7\www\catalog\admin\includes\classes\object_info.php on line 18

Posted
any help would be much appreciated!

I dont know if this will help here is line 17 and 18

 

reset($object_array);

while (list($key, $value) = each($object_array)) {

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Posted
I dont know if this will help here is line 17 and 18

 

reset($object_array);

      while (list($key, $value) = each($object_array)) {

This is my file:

  class objectInfo {

// class constructor
   function objectInfo($object_array) {
     reset($object_array);
     while (list($key, $value) = each($object_array)) {
       $this->$key = tep_db_prepare_input($value);
     }
   }
 }
?>

what is the porblem?

Posted

this is the products_description table:

 

products_id int(11) No auto_increment

language_id int(11) No 1

products_name varchar(64) No

products_description longtext Yes NULL

products_url varchar(255) Yes NULL

products_viewed int(5) Yes 0

products_info text No

products_matriale1 text No

products_farve1 text No

products_bemark_pro1 text No

products_head_title_tag varchar(80) Yes NULL

products_head_desc_tag longtext Yes NULL

products_head_keywords_tag longtext Yes NULL

Posted

the problem was } in admin/categories.php

    } else {
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_matriale1, pd.products_farve1, pd.products_bemark_pro1, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_volume, p.products_hoj, p.products_lang, p.products_bred, p.products_ind1, p.products_ind2, p.products_ind3, p.products_ind4, p.products_ind5, p.products_pro1, p.products_pro2, p.products_pro3, p.products_pro4, p.products_pro5, p.products_bemark_ind, p.products_bemark_pro, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
     $product = tep_db_fetch_array($product_query); 
}
     $pInfo = new objectInfo($product);
     $products_image_name = $pInfo->products_image;
   

move } to here

    } else {
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_matriale1, pd.products_farve1, pd.products_bemark_pro1, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_volume, p.products_hoj, p.products_lang, p.products_bred, p.products_ind1, p.products_ind2, p.products_ind3, p.products_ind4, p.products_ind5, p.products_pro1, p.products_pro2, p.products_pro3, p.products_pro4, p.products_pro5, p.products_bemark_ind, p.products_bemark_pro, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
     $product = tep_db_fetch_array($product_query); 

     $pInfo = new objectInfo($product);
     $products_image_name = $pInfo->products_image;
   }

Posted

Usually when your shop breaks after installing a contribution, it is because a mistake was made in the installation. What I always do is make a complete backup of my shop before installing a contribution. Then if it doesn't work, I can just delete the whole thing and start over. If you did a backup, that would be my next step. If you didn't, then you should go through the instructions step-by-step and make sure everything is where it should be.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted
Usually when your shop breaks after installing a contribution, it is because a mistake was made in the installation.  What I always do is make a complete backup of my shop before installing a contribution.  Then if it doesn't work, I can just delete the whole thing and start over.  If you did a backup, that would be my next step.  If you didn't, then you should go through the instructions step-by-step and make sure everything is where it should be.

 

Jack

Thanks Jack after the } moved down everything is ok.

 

By the way for all the product pages, will it no be ok of I use products_description table instead of products_head_desc_tag table and products_name table instead of products_head_title_tag?

 

And what about the keywords if google already has the product name and description, than the keywords are only needed for words not in product name and description, like tipical misspelling words and related words?

Posted
Thanks Jack after the } moved down everything is ok.

 

By the way for all the product pages, will it no be ok of I use products_description table instead of products_head_desc_tag table and products_name table instead of products_head_title_tag?

 

And what about the keywords if google already has the product name and description, than the keywords are only needed for words not in product name and description, like tipical misspelling words and related words?

I don't uderstand your first question.

 

As for the keywords, google doesn't use the keywords at all when listing pages although there is some indication that they do use them for calculating keyword density. But other SE's do use the keywords so you should use them as they are meant to be used. Don't use them as you suggest, that is a waste. Use them to place keyword(s) that match your page. Don't have too many of them though (3-4 is plenty). This is an excellent way to get keyword density higher.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...