Criz Posted December 12, 2002 Share Posted December 12, 2002 Hello, I have installed the Header Tag Controller mod, which is working great. I currently have one problem. When I add new products, it seems like the Header Tag Controller is not generating Page Titles for these new product pages. Can anyone help me out here? Thanks, Chris Quote Link to comment Share on other sites More sharing options...
Ross Posted December 12, 2002 Share Posted December 12, 2002 AFAIK, that contribution has no way to set the titles or any of the other info that it uses...it would be up to you to add the proper values to the fields for each product in the DB. I saved myself some work and added some code to admin/categories.php to insert the product name both to the products_name field and to the products_head_title field at the same time. I did also add three fields to the bottom of the product insert/edit section to work with the title, description and keywords on the pages rather than in the DB. If you'd want to use the exact product names to include in the title instead of something else, you can try changing this code in the functions/header_tags.php under the tep_get_header_tag_products_title function. Change this: $product_header_tags = tep_db_query("select products_head_title_tag from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages_id . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); to this: $product_header_tags = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages_id . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); This should automatically pull the product names in for use in the page titles. Again, if you want to use a title different from the product names, don't use this. HTH Quote Link to comment Share on other sites More sharing options...
Criz Posted December 12, 2002 Author Share Posted December 12, 2002 Hi Ross, Thanks for your reaction. All the products in my dbase got automatically the Title tag, generated by Header Tag Controller. The strange thing is, that it doesn't work for new products. In my opinion it should work also for new products. I definitely look into the codes you supplied. Regards, Chris Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 12, 2002 Share Posted December 12, 2002 If you look in the contributions, I had asked Richard for some help and he wrote an Admin to work with the Header Tags Controller ... both of which are also included in Ian's Current Load4 Quote Link to comment Share on other sites More sharing options...
Criz Posted December 15, 2002 Author Share Posted December 15, 2002 Dear Linda, I have taken a look at the adminstration tool and will for sure install. But my point/question was not about that. When I installed your contribution, it automatically generated header tags for all the current products in my dbase. Is that something happening only when I install the contribution? Or does that also need to happen when adding new products. After installing, all the product pages had the product name in the page title, exactly like I wished it would be. The new products do not have the product name in the page title. Could you please shed a light on this matter? Thanks, Chris Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 15, 2002 Share Posted December 15, 2002 If you originally replaced all the titles with the product name then they are in there for your old products. But, from that point on, you need to add something there. It really depends on how you configured the settings as to what is being displayed on the product_info.php Quote Link to comment Share on other sites More sharing options...
Criz Posted December 18, 2002 Author Share Posted December 18, 2002 Ross, I have added the code you provided. It does not seem to work for me, although the codes looks ok. When I changed the code to your code, nothing happened. When I entered something in products_head_title_tag in TABLE_PRODUCTS_DESCRIPTION it still pulled in the date from there and not from the products_name. I looked into it, but did not find an answer yet. Maybe you can help me out. Thanks, Chris Quote Link to comment Share on other sites More sharing options...
Ajeh Posted December 18, 2002 Share Posted December 18, 2002 Check how you have the configuration defined for the settings in the language files. They determine what shows on what page. You can have individual product info, the ALL settings which is the default, or a combination. Don't be confused by the DEFAULT tags, those are for the default.php page. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.