Jump to content

daisy333

Members
  • Content count

    1
  • Joined

  • Last visited

Profile Information

  • Real Name
    Becky Kern
  1. daisy333

    SEO Meta Tags STS

    I think I have found a solution to the problem. Its a bit of a hack as I am not that good at this yet but seems to work for me. in: includes/functions/metatags.php add // Function to return TITLE tag function nameCategory($id, $lid) { $languages_id=(int)$lid; $Title = TITLE; // Defaults to global TITLE definition $product_name_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $id . "' and language_id = '" . (int)$languages_id . "'"); $categories_name = tep_db_fetch_array($product_name_query); if (tep_not_null($categories_name['categories_name'])) { $Title = $categories_name['categories_name']; } return ($Title); } and then replace the Meta Title Function int he metatags.php page with: // Function to return TITLE tag function MetaTagTitle($id, $lid) { $languages_id=(int)$lid; $Title = ""; // Defaults to global TITLE definition $product_name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $id . "' and language_id = '" . (int)$languages_id . "'"); $product_name = tep_db_fetch_array($product_name_query); if (tep_not_null($product_name['products_name'])) { $Title = $product_name['products_name'] . PREFIX_TITLE; } return ($Title); } in includes/modules/sts_inc/general.php replace $sts->template['headertags']= "<title>" . MetaTagTitle($products_id, $languages_id) . " " . nameCategory($current_category_id, $languages_id) ."</title>"; with $sts->template['headertags']= "<title>" . MetaTagTitle($_GET[products_id], $languages_id) . " " . nameCategory($current_category_id, $languages_id) ."</title>"; depending on if you want the category or product names to display you can change about the order in the meta tags page. hope this helps...
×