camburst Posted January 16, 2003 Share Posted January 16, 2003 Hello Forum, I ran across this problem with the Header TagsControllerv2 contribution. Any product from the product_info.php does not have a <title>. <meta content> and <meta description> that reflects the product - example http://www.thewebmakerscorner.com/theshop/...products_id=113 The product is called "cats" but it still says "webmakers corner" at the top and the meta tags dont change either. Im still learning PHP so Im sure theres a better way to do this. My mod basically adds the name of the product for the title and grabs some of the product description to generate meta tags and combines it with the ones declared in the english/header_tags.php Note- Im using a early version of 2.2 - I believe its 20020917, maybe later versions dont have this problem. 1. Install Headertags 2 exactly from the readme 2. open includes/header_tags.php ---- find line // PRODUCT_INFO.PHP (around line 49) notice the first line is commented out - depending on your version you'll need the first or second line - to make sure which line you need open up product_info.php around line 57 look at this code $product_info =***** find which one matches and comment out the other 3. Now go a couples lines down to the if statement (original) if (empty($the_product_info['products_head_desc_tag'])) { $the_desc= HEAD_DESC_TAG_ALL; (update -------------- the description) if (empty($the_product_info['products_head_desc_tag'])) { $grabstring = $the_product_info['products_description']; $rest = substr("$grabstring", 0, 60); // grabs the first 60 characters from the description $the_desc= $rest."..., ".HEAD_DESC_TAG_ALL; 4. update the keywords (original) if (empty($the_product_info['products_head_keywords_tag'])) { $the_key_words= HEAD_KEY_TAG_ALL; (update -------------- the keywords) if (empty($the_product_info['products_head_keywords_tag'])) { $the_key_words= $rest."..., ".HEAD_KEY_TAG_ALL; 5. Update the Title (original) if (empty($the_product_info['products_head_title_tag'])) { $the_title= HEAD_TITLE_TAG_ALL; (update -------------- the title) if (empty($the_product_info['products_head_title_tag'])) { $the_title= $the_product_info['products_name']; 6. If you put your site name in the languages/header_tags.php -- you dont need to do this. (original) echo ' <title>' . $the_title . '</title>' . "n"; (update -------------- the title------) echo ' <title>Yoursitegoeshere.com -' . $the_title . '</title>' . "n"; This is aimed more at the beginners. OSC forum has been a big help for me, Im giving something back. also ----- remember to backup your files Thanks, Jody Quote Link to comment Share on other sites More sharing options...
rubygirl Posted January 16, 2003 Share Posted January 16, 2003 In order to put your settings in - you need to edit the text in the header_tags.php file you can find that in catalog/includes/languages/english/header_tags.php hope that helps.... :) 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.