Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom Meta Tags....Are they worth it?


Stevis2002

Recommended Posts

Posted

Hi all,

 

Just wanted to ask you guys a quick question.....I have installed Chemo's SEO contribution..(Many Thanks for being that clever!)...and i have heard/saw people using custom meta tags.

 

I know approximately nothing about meta tags apart from the ones which describe your site and list your keywords.

 

What are the others, and are they any use at all?

 

Thanks for all your time!

 

Steve

 

EDIT:-- I also have Header Tags contribution installed to...Many Thanks for that as well!!

Posted

META TAGS are nice to have, but don't go out of your way. No major search engines are using them as criteria for placement anymore. Inktomi is the only relatively widely used search engine that still uses them.

 

-Aaron

Posted

Here is some code that will enable spiders to crawl all languages as alternate translations. Reference the W3C specification for the link element and proper implementation. It would be best to also include the charset into the attribute definitions.

 

In includes/classes/language.php add this method to the class:

function alt_languages($direct_output = false){
       $language_string = '';
       foreach ($this->catalog_languages as $code => $data){
           if ($this->language['id'] == $data['id']) continue;
           $href = tep_href_link($_SERVER['PHP_SELF'], tep_get_all_get_params() . 'language=' . $code, 'NONSSL', false);
           $language_string .= '<link rel="alternate" type="text/html" href="'.$href.'" lang="'.$code.'"  hreflang="'.$code.'" title="'.$data['name'].' Translation" />' . "\n";            
       } # end foreach
       if ( $direct_output ){
           echo $language_string;
       } else {
           return $language_string;
       }
   } # end function

Next, add this to the head section of whatever script (probably index.php and product_info.php make the most sense):

if ( !is_object($lng) ){
   if ( !class_exists('language') ){
       include(DIR_WS_CLASSES . 'language.php');
   }
   $head_lng = new language();      
   $head_lng->get_browser_language();
   $head_lng->alt_languages(true);
} else {
   $lng->alt_languages(true);
}

This will output a list of link tags pointing to the alternate languages. This is the W3C recommended method of presenting translations and works much like the alternate XML/RSS tags.

 

Of course, if you don't have alternate languages this will do nothing for you and adds no value.

Archived

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

×
×
  • Create New...