♥toyicebear Posted May 1, 2007 Author Share Posted May 1, 2007 Sounds like a pretty good and maintainable solution to me, but on which file do I need to replace the <title> tag? Or do I need to replace every single occurence on all php files?? The most important is: index.php and product_info.php But you will also have to modify any other .php file where you want meta tags to show. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
mikeemmessen Posted July 20, 2007 Share Posted July 20, 2007 I did this for myself, if it helps Adds dynamic page titles and meta info to osCommerce based on the existing breadcrumb so no extra queries. Replace <title></title> with .. <?php include(DIR_WS_INCLUDES . 'meta_info.php'); ?> create a file called meta_info.php and place in catalog>includes. File contains the following: - <?php /* $Id: meta_info.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ /********************************************** Modifications by ... Robert Fisher aka Thunderace **********************************************/ // This file uses the breadcrumb class to create SEO friendly page titles $title = ''; $meta_description = ''; $meta_keywords = ''; $count = count($breadcrumb->_trail); for ($i=0; $i<($count); $i++) { if ($breadcrumb->_trail[$i]['title'] != HEADER_TITLE_TOP && $breadcrumb->_trail[$i]['title'] != HEADER_TITLE_CATALOG) { $title .= $breadcrumb->_trail[$i]['title'] . ' | '; $meta_description .= $breadcrumb->_trail[$i]['title'] . ' | '; $meta_keywords .= $breadcrumb->_trail[$i]['title'] . ', '; if ($i == ($count-1)) { //$shop_name is hardcoded if you wish to add your shop name to the end of <title> and meta info $shop_name = 'My Shop'; $title .= $shop_name; $meta_description .= $shop_name; $meta_keywords .= $shop_name; } } } if ($title == '') { //below are hardcoded to show meta info when no breadcrumb exists $title = 'My standard shop title'; $meta_description = 'My standard shop description'; $meta_keywords = 'My standard shop keywords'; } //Display <title> and meta info echo '<title>' . $title . '</title>' . "\n"; echo '<meta name="description" content="' . $meta_description . '" />' . "\n"; echo '<meta name="keywords" content="' . $meta_keywords . '" />' . "\n"; ?> I applied this piece of code, together with the <A href="http://www.oscommerce.com/community/contributions,4354/category,all/search,breadcrumb">breadcrum contribution</A>and it works beautifully! However, I was wondering how to add other meta tags to my webshop, like abstract, author, language, revisit and robots meta tags. Some of these (like author and language) would be identical for all webpages, so I presume I could just add these to the php scripts in the catalog folder? One other question. Could there perhaps be a way to add custom meta keywords to the category and product pages? Probably I am asking too much, since this wonderful peace of code automatically generates meta keywords, but if there were a way add custom meta keywords per product and category, it would be so nice.... thanks for the great contribution! Mike Emmessen Link to comment Share on other sites More sharing options...
♥FWR Media Posted July 20, 2007 Share Posted July 20, 2007 I applied this piece of code, together with the <A href="http://www.oscommerce.com/community/contributions,4354/category,all/search,breadcrumb">breadcrum contribution</A>and it works beautifully! However, I was wondering how to add other meta tags to my webshop, like abstract, author, language, revisit and robots meta tags. Some of these (like author and language) would be identical for all webpages, so I presume I could just add these to the php scripts in the catalog folder? One other question. Could there perhaps be a way to add custom meta keywords to the category and product pages? Probably I am asking too much, since this wonderful peace of code automatically generates meta keywords, but if there were a way add custom meta keywords per product and category, it would be so nice.... thanks for the great contribution! Mike Emmessen abstract, author, language, revisit and robots meta tags. These were left out because tbh they are useless (not used by SEs), so I wouldn't bother. Language is best defined in <html> to my knowledge .. e.g. <html xmlns="http://www.w3.org/1999/xhtml" lang="en_GB"> Could there perhaps be a way to add custom meta keywords to the category and product pages? Probably I am asking too much, since this wonderful peace of code automatically generates meta keywords, but if there were a way add custom meta keywords per product and category, it would be so nice. My meta tag script is basic but does what I require of it, if you need more control then there are excellent far more powerful solutions in the contribs area. Header Tags Controller is excellent and being written by Jack_mcs it's bound to be good code. Hope that helps. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 20, 2007 Author Share Posted July 20, 2007 I applied this piece of code, together with the <A href="http://www.oscommerce.com/community/contributions,4354/category,all/search,breadcrumb">breadcrum contribution</A>and it works beautifully! However, I was wondering how to add other meta tags to my webshop, like abstract, author, language, revisit and robots meta tags. Some of these (like author and language) would be identical for all webpages, so I presume I could just add these to the php scripts in the catalog folder? One other question. Could there perhaps be a way to add custom meta keywords to the category and product pages? Probably I am asking too much, since this wonderful peace of code automatically generates meta keywords, but if there were a way add custom meta keywords per product and category, it would be so nice.... thanks for the great contribution! Mike Emmessen This tread is not a support tread for any contribution, just information about some of the available meta tags contributions and their install. If you want more manual control, you can go back to the first page of this tread and read up on Header Tags Controller. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Rachael w. Posted August 24, 2007 Share Posted August 24, 2007 Its been a while since I've been back to this thread. I have had success with the code I've previously posted to generate the metatags for my shop. Now, I realize I need header tags. I've downloaded the header tags 2.6.3 version. I did read back in this thread that just using the sql and catalog side of this would generate the header tags automatically for me. My fear is that I'll be messing my current metatag codes up. Does anyone have this working for their sites? I'd love to have header tags show up, but I dont want to have to enter the info for every product. Thank you in advance for your help! Link to comment Share on other sites More sharing options...
♥toyicebear Posted August 24, 2007 Author Share Posted August 24, 2007 Its been a while since I've been back to this thread. I have had success with the code I've previously posted to generate the metatags for my shop. Now, I realize I need header tags. I've downloaded the header tags 2.6.3 version. I did read back in this thread that just using the sql and catalog side of this would generate the header tags automatically for me. My fear is that I'll be messing my current metatag codes up. Does anyone have this working for their sites? I'd love to have header tags show up, but I dont want to have to enter the info for every product. Thank you in advance for your help! Adding a new meta tags contribution will of-course remove all the meta tags info you have from before. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Rachael w. Posted August 24, 2007 Share Posted August 24, 2007 I guess what I'm asking is this, is there an easier way to add some sort of header tags to the code I am already using without adding another meta tag contrib? Link to comment Share on other sites More sharing options...
♥toyicebear Posted August 25, 2007 Author Share Posted August 25, 2007 I guess what I'm asking is this, is there an easier way to add some sort of header tags to the code I am already using without adding another meta tag contrib? What are you referring to when you say "Header Tags" ? The header tags controller does not add any special "header tags" , it adds meta tags. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Rachael w. Posted August 27, 2007 Share Posted August 27, 2007 What are you referring to when you say "Header Tags" ? The header tags controller does not add any special "header tags" , it adds meta tags. Hmmm, I thought header tags were the <h1> and so on tags. And because I thought that, I assumed this contrib would create that sort of thing. I already have a decent enough meta tag thing going on. I was hoping my sites would rank a little higher if I found some contrib to add the <h1> tags since it does not appear that my osc sites have them. Link to comment Share on other sites More sharing options...
♥toyicebear Posted August 28, 2007 Author Share Posted August 28, 2007 Hmmm, I thought header tags were the <h1> and so on tags. And because I thought that, I assumed this contrib would create that sort of thing. I already have a decent enough meta tag thing going on. I was hoping my sites would rank a little higher if I found some contrib to add the <h1> tags since it does not appear that my osc sites have them. You can easily add h1 tags to the solution you already have.... 1. add h1 definitions to you stylesheet, something like this: h1 { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; margin-bottom: 0; padding-bottom: 0; } 2. in any files where you want to use the tags, you can then just change the line which showes the heading: Some examples: Product_info.php change: <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> To: <td valign="top"><h1><?php echo $products_name; ?></h1></td> <td align="right" valign="top"><h1><?php echo $products_price; ?></h1></td> For other standard pages, something like this: change: <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> to: <td><h1><?php echo HEADING_TITLE; ?></h1></td> Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Rachael w. Posted August 28, 2007 Share Posted August 28, 2007 :P I just came back to tell you I decided to do it manually via the tags and css and you had the same idea! Well, at least your info will help others before they wander off into the land of confusion I just left! Thanks so much for your help! Link to comment Share on other sites More sharing options...
♥toyicebear Posted October 28, 2007 Author Share Posted October 28, 2007 Easy Meta Tags is a automatic meta tags generator which gives basic but relevant meta tags for all your osCommerce powered web shop pages. It works with osCommerce MS2.2 up to and included the latest RC1 version. Instructions for install on shops using STS V4... is also included. This is not in any way a replacement for the header tags controller which is a very fully featured solution with manual and automatic meta tags information and also includes several other extra features for your site. But if you are uncomfortable with complex installs and/or have a modified and/or template based shop....it offers a very easy and quick install which most should be able to do by simply following the included instructions. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
xlilo Posted November 18, 2007 Share Posted November 18, 2007 how can i customise the title of the home page withpout changeing the cat paghes? Link to comment Share on other sites More sharing options...
♥toyicebear Posted November 19, 2007 Author Share Posted November 19, 2007 how can i customise the title of the home page withpout changeing the cat paghes? you can install the latest version of easy meta tags , it lets you set the title, meta description and meta keywords for the front page only.... (All other titles and metas are generated automatically) Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
jbastow Posted November 22, 2007 Share Posted November 22, 2007 2. C-Dynamic Meta Tags This contribution incerts meta tags automatically for your shops products and categories (and new products, specials ++), in addition it lets you add meta tags for your index page and general tags manually. The meta tags can also be cached for shortest possible execution time, lower server load and faster page load time. Install Install is very easy and straight forward. I'm installing this addon as we speak, but I'm not sure if it'll work for me. I've already installed another contribution for search engine-friendly URLs, which required me to edit the code. I've now basically blindly added the code for the meta tag contrib, and I'm not sure if it's right: $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); // Ultimate SEO URLs v2.1 -- NOTE: This contrib was added first // If the action will affect the cache entries if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php'); # cDynamic Meta Tags -- NOTE: This was added second (I kinda just stuck it in between other chunks of code) // If the action will affect the cache entries if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php'); if (tep_not_null($action)) { switch ($action) { case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } I tested the site, and it still functions (definitely a good thing) but I just want to check that this is still going to allow the meta tags contrib to work. Thanks for your help! Link to comment Share on other sites More sharing options...
♥toyicebear Posted November 24, 2007 Author Share Posted November 24, 2007 I'm installing this addon as we speak, but I'm not sure if it'll work for me. I've already installed another contribution for search engine-friendly URLs, which required me to edit the code. I've now basically blindly added the code for the meta tag contrib, and I'm not sure if it's right: $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); // Ultimate SEO URLs v2.1 -- NOTE: This contrib was added first // If the action will affect the cache entries if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php'); # cDynamic Meta Tags -- NOTE: This was added second (I kinda just stuck it in between other chunks of code) // If the action will affect the cache entries if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php'); if (tep_not_null($action)) { switch ($action) { case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } I tested the site, and it still functions (definitely a good thing) but I just want to check that this is still going to allow the meta tags contrib to work. Thanks for your help! should be ok... Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
tng001 Posted December 10, 2007 Share Posted December 10, 2007 Hi Nick, I tried to install your Basic Meta Tags and now only product pages are showing the product titles, the Category and Sub-Category pages are showing "HEADING_TITLE_NEW" instead. Any advise? thanks Link to comment Share on other sites More sharing options...
♥toyicebear Posted December 10, 2007 Author Share Posted December 10, 2007 Hi Nick, I tried to install your Basic Meta Tags and now only product pages are showing the product titles, the Category and Sub-Category pages are showing "HEADING_TITLE_NEW" instead. Any advise? thanks Go through the install one more time and make sure you have done all the required changes. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2007 Share Posted December 12, 2007 Hi, I was wondering which meta contribution would you recommend for my ecommerce website with the type of product line I offer? I want to make sure I get good page ranks. http://www.blackthorne.ca Link to comment Share on other sites More sharing options...
gotit Posted December 12, 2007 Share Posted December 12, 2007 HI Jack, I followed all the instructions for generating meta tags and added fields to product description. Uploaded the files according to instruction and made the changes required to some files. Now I can add meta tags in product update page in admin. Problem is that when i click on any of those products i get this error: Fatal error: Call to undefined function: clean_html_comments() in /homepages/4/d191950542/htdocs/includes/header_tags.php on line 79 and this is how line 79 looks like in includes/header_tags.php else { if ( HTTA_PRODUCT_INFO_ON=='1' ) { (79) $the_title= HEAD_TITLE_TAG_ALL . ' ' . clean_html_comments($the_product_info['products_head_title_tag']); } else { I use v2.2 Can you help Thanks, Link to comment Share on other sites More sharing options...
♥toyicebear Posted December 12, 2007 Author Share Posted December 12, 2007 HI Jack,I followed all the instructions for generating meta tags and added fields to product description. Uploaded the files according to instruction and made the changes required to some files. Now I can add meta tags in product update page in admin. Problem is that when i click on any of those products i get this error: Fatal error: Call to undefined function: clean_html_comments() in /homepages/4/d191950542/htdocs/includes/header_tags.php on line 79 and this is how line 79 looks like in includes/header_tags.php else { if ( HTTA_PRODUCT_INFO_ON=='1' ) { (79) $the_title= HEAD_TITLE_TAG_ALL . ' ' . clean_html_comments($the_product_info['products_head_title_tag']); } else { I use v2.2 Can you help Thanks, Ask in the header tags support tread.... Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
♥toyicebear Posted December 12, 2007 Author Share Posted December 12, 2007 Hi, I was wondering which meta contribution would you recommend for my ecommerce website with the type of product line I offer? I want to make sure I get good page ranks.http://www.blackthorne.ca Read this tread from page 1 and decide if you want automatic or manual meta tags for your shop. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
bonzabuy Posted December 15, 2007 Share Posted December 15, 2007 I did this for myself, if it helps Adds dynamic page titles and meta info to osCommerce based on the existing breadcrumb so no extra queries. Replace <title></title> with .. <?php include(DIR_WS_INCLUDES . 'meta_info.php'); ?> create a file called meta_info.php and place in catalog>includes. File contains the following: - <?php /* $Id: meta_info.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ /********************************************** Modifications by ... Robert Fisher aka Thunderace **********************************************/ // This file uses the breadcrumb class to create SEO friendly page titles $title = ''; $meta_description = ''; $meta_keywords = ''; $count = count($breadcrumb->_trail); for ($i=0; $i<($count); $i++) { if ($breadcrumb->_trail[$i]['title'] != HEADER_TITLE_TOP && $breadcrumb->_trail[$i]['title'] != HEADER_TITLE_CATALOG) { $title .= $breadcrumb->_trail[$i]['title'] . ' | '; $meta_description .= $breadcrumb->_trail[$i]['title'] . ' | '; $meta_keywords .= $breadcrumb->_trail[$i]['title'] . ', '; if ($i == ($count-1)) { //$shop_name is hardcoded if you wish to add your shop name to the end of <title> and meta info $shop_name = 'My Shop'; $title .= $shop_name; $meta_description .= $shop_name; $meta_keywords .= $shop_name; } } } if ($title == '') { //below are hardcoded to show meta info when no breadcrumb exists $title = 'My standard shop title'; $meta_description = 'My standard shop description'; $meta_keywords = 'My standard shop keywords'; } //Display <title> and meta info echo '<title>' . $title . '</title>' . "\n"; echo '<meta name="description" content="' . $meta_description . '" />' . "\n"; echo '<meta name="keywords" content="' . $meta_keywords . '" />' . "\n"; ?> Gday - sorry if this is a silly question... Where do you put: <?php include(DIR_WS_INCLUDES . 'meta_info.php'); ?> ? Do I replace the title tags in product_info.php ? or index.php or others ? Thanks in advance Link to comment Share on other sites More sharing options...
♥toyicebear Posted December 15, 2007 Author Share Posted December 15, 2007 Gday - sorry if this is a silly question...Where do you put: <?php include(DIR_WS_INCLUDES . 'meta_info.php'); ?> ? Do I replace the title tags in product_info.php ? or index.php or others ? Thanks in advance Using the mod from Robert Fischer mentioned earlier in this tread you should do it for these 2 files atleast: index.php and product_info.php change: <title><?php echo TITLE; ?></title> to <?php include(DIR_WS_INCLUDES . 'meta_info.php'); ?> Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
bonzabuy Posted December 15, 2007 Share Posted December 15, 2007 Using the mod from Robert Fischer mentioned earlier in this tread you should do it for these 2 files atleast: index.php and product_info.php change: to Thanks - does this mean the tip listed (the one I quoted) was to be used as part of a contrib? I thought it was an alternative to the contrib> must have missed the point altogether. Would be great for dumbos like me to have a thread that answered the 'which contrib is best' & 'which ones work together' or even 'what total SEO package works best' for urls, meta tags, headers etc. I have read through what feel like hundreds of pages (always exaggerating!) & am still no wiser... Have installed header tags for novices & was going to do a Google sitemap one just in the meantime while I try to figure out the best way to go... This thread was probably the most helpful with the 'auto or manual meta tags' question & a few other tips so thanks to all concerned. I guess SEO is no simple topic! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.