Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How To Rewrite The Title Tag To Product Level ?


yh_boon84

Recommended Posts

Posted

Hi, i have facing problems in rewrite the title tag to product level for SEO purpose. Now just can rewrite the title tag up to category level only. How if i want it to be in the product level as well? Which part of coding i have to look at it? after i look at the php code... i think we can add somethings in includes/header_tags in this part

 

// INDEX.PHP

case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ):

 

$showCatTags = false;

 

if ($category_depth == 'nested' || $category_depth == 'products') {

$the_category_query = tep_db_query("select categories_name as name, categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

$showCatTags = true;

} else if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$the_category_query= tep_db_query("select m.manufacturers_name as name, mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$showCatTags = true;

} else {

$the_category_query = tep_db_query("select categories_name as name, categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

}

 

$the_category = tep_db_fetch_array($the_category_query);

 

if (HTDA_DEFAULT_ON=='1') {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['desc']= $the_category['htc_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;

} else {

$tags_array['desc']= $the_category['htc_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;

}

} else {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['desc']= $the_category['htc_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;

} else {

$tags_array['desc']= $the_category['htc_desc_tag'];

}

} else {

$tags_array['desc']= HEAD_DESC_TAG_DEFAULT;

}

}

 

if (HTKA_DEFAULT_ON=='1') {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['keywords']= $the_category['htc_keywords_tag'] . ', ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;

} else {

$tags_array['keywords']= $the_category['htc_keywords_tag'] . ', ' . HEAD_KEY_TAG_DEFAULT;

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_ALL . ', ' . HEAD_KEY_TAG_DEFAULT;

}

} else {

if ($showCatTags == true) {

if (HTTA_CAT_DEFAULT_ON=='1') {

$tags_array['keywords']= $the_category['htc_keywords_tag'] . ', ' . HEAD_KEY_TAG_DEFAULT;

} else {

$tags_array['keywords']= $the_category['htc_keywords_tag'];

}

} else {

$tags_array['keywords']= HEAD_KEY_TAG_DEFAULT;

}

}

 

 

May i know it is correct to work at this part? if not please kindly tell me where i have to look at? and how i have to do?

Thank you very much.

Posted

There is no need to edit that file. Go to admin->Catalog and edit the product you want to change.You should run admin->Header Tags->Fill Tags first though since it will save you a lot of time.

 

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...