Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Hi Jack,

 

I'd already installed 3.05 but can't see a file in the package for Update_from_V_3.0.5_to_V_3.0.6.

 

What instructions should I follow to update 3.05?

 

Thanks

 

Mike

Share this post


Link to post
Share on other sites
It appears you don't have header tags titles set for the categories. You need to enable the category option for the home page.

 

Jack

 

Thank you Jack.

 

It seems I must have screwed something else up too. :blush:

 

When I click Include: Category: then Update, I receive this error - Missing sort orders are not allowed -> index.php

Seems I have made a mess of things... :(

 

-- EDIT --

 

Never mind, I solved the problem. DUH

 

Gesh I need a break away from this keyboard!

 

Thank you so much Jack for helping me out, truely appreciated! ;)

Hope I wasn't too much of a pain.

 

Well I'm going fishing!!! :P

Edited by jhande

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites
Hi Jack,

 

I'd already installed 3.05 but can't see a file in the package for Update_from_V_3.0.5_to_V_3.0.6.

 

What instructions should I follow to update 3.05?

 

Thanks

 

Mike

Just use the one named Update_from_V_3.0.4_to_V_3.0.6.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
Just use the one named Update_from_V_3.0.4_to_V_3.0.6.

 

Jack

 

Jack,

 

Thanks it works. Only one thing that has been bugging me which I guess could be an easy fix (unless I've missed it already). When on a category page the category name will get added to the keywords, but what would be really good was if the subcategory names would all be added as well.

 

For example, I run an equestrian store: neddyup. Under 'For Horse' I have items such as 'Rugs', 'Saddles', 'Bridles' etc. When I look at my 'For Horse' page, I only get the keywords for 'For Horse' rather than showing all of the subcategories which makes up the content for the site and would improve indexing.

 

Let me know what you think about the idea? - at the moment I have been manually adding the keywords to the parent category every time I add / change a subcategory.

 

Cheers

 

Mike

Share this post


Link to post
Share on other sites

Jack

 

Sorry to be a pain, I clicked to add a pseduo page and it all looked good but then I went back to my site and every page suddenly has a load of code at the top of it it:

 

"page = 'index.php?cPath=2'; $parts = explode("?",$page); $parts = explode("=", $parts[1]); if (isset($parts[0])) { $found = false; $name = FILENAME_INDEX . "?" . $parts[0] . "="; $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $name . "%' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($pageTags_query) > 0) { while($pageTags = tep_db_fetch_array($pageTags_query)) { if ($name . $_GET[$parts[0]] === $pageTags['page_name']) { $header_tags_array = tep_header_tag_page($pageTags['page_name']); $found = true; break; } } } if (! $found) $header_tags_array = tep_header_tag_page(FILENAME_INDEX); } else"

 

Looking at the source this code is being generated in the head under the verify-v1 meta tag.

 

I added a psedo code 'index.php?cPath=2' and now a piece of random code with that address is hardcoded across every page on the site.

 

my site is neddyup . co . uk.

 

Any advice would really be appreciated! - I deleted the pseudo page but the random code is still showing

 

Regards

 

Mike

Share this post


Link to post
Share on other sites
Jack,

 

Thanks it works. Only one thing that has been bugging me which I guess could be an easy fix (unless I've missed it already). When on a category page the category name will get added to the keywords, but what would be really good was if the subcategory names would all be added as well.

 

For example, I run an equestrian store: neddyup. Under 'For Horse' I have items such as 'Rugs', 'Saddles', 'Bridles' etc. When I look at my 'For Horse' page, I only get the keywords for 'For Horse' rather than showing all of the subcategories which makes up the content for the site and would improve indexing.

 

Let me know what you think about the idea? - at the moment I have been manually adding the keywords to the parent category every time I add / change a subcategory.

 

Cheers

 

Mike

Thanks for the suggestion. I'll put that on the list for a furture version.

 

Jack

Share this post


Link to post
Share on other sites
I added a psedo code 'index.php?cPath=2' and now a piece of random code with that address is hardcoded across every page on the site.

 

my site is neddyup . co . uk.

 

Any advice would really be appreciated! - I deleted the pseudo page but the random code is still showing

 

Regards

 

Mike

Pseudo mean fake or not real. The page index.php?cPath=2 is a real page so you can't add it that way. It is already part of the index section. Doing what you did has corrupted the includes/header_tags.php file. That will have to be replaced or edited to fix it.

 

Jack

Share this post


Link to post
Share on other sites
Pseudo mean fake or not real. The page index.php?cPath=2 is a real page so you can't add it that way. It is already part of the index section. Doing what you did has corrupted the includes/header_tags.php file. That will have to be replaced or edited to fix it.

 

Jack

 

Jack, thanks I'm glad it was so simple to fix, I have replaced the file and its working again! - phew!!

 

I was trying to use the functionality to add a unique title to each of the category and products pages. Am I right in assuming that this isn't possible in this contribution?

 

Thanks again!!!

 

Mike

Share this post


Link to post
Share on other sites
I was trying to use the functionality to add a unique title to each of the category and products pages. Am I right in assuming that this isn't possible in this contribution?
Having unique titles for the category and products pages is one of the main features of the contribution.

 

Jack

Share this post


Link to post
Share on other sites
As mentioned in the docs, use the included categories files to troubleshoot problems with that area.

 

Jack

 

Hey Jack,

 

I just installed the Header Tags SEO contribution, and the text I put in the Header Tags Categories Description field only shows up in Categories that have subcategories in it. It doesn't appear for categories that only have products. Should it be?

 

I'm using the admin/categories.php file that was included with your contribution.

 

Thanks!

Share this post


Link to post
Share on other sites
Hey Jack,

 

I just installed the Header Tags SEO contribution, and the text I put in the Header Tags Categories Description field only shows up in Categories that have subcategories in it. It doesn't appear for categories that only have products. Should it be?

 

I'm using the admin/categories.php file that was included with your contribution.

 

Thanks!

When you say "only shows up in Categories," does that mean in the shop or in admin? Did you run Fill Tags?

 

Jack

Share this post


Link to post
Share on other sites
When you say "only shows up in Categories," does that mean in the shop or in admin? Did you run Fill Tags?

 

Jack

 

Hey Jack, sorry, I meant that in the shop, I only see the Categories Description that I put in Admin for the top level categories, not the subcategories.

 

I have a top level category called "Products" and when I go to that in the shop, I see my Categories Description.

 

There's a subcategory in the Products category called Aromatherapy (which only has products). When I go to the Aromatherapy category in the shop, the Categories Description doesn't show up.

 

And, yes, I ran fill tags.

 

Thanks!

Share this post


Link to post
Share on other sites
Hey Jack, sorry, I meant that in the shop, I only see the Categories Description that I put in Admin for the top level categories, not the subcategories.

 

I have a top level category called "Products" and when I go to that in the shop, I see my Categories Description.

 

There's a subcategory in the Products category called Aromatherapy (which only has products). When I go to the Aromatherapy category in the shop, the Categories Description doesn't show up.

 

And, yes, I ran fill tags.

 

Thanks!

Oh, I missed the "description part." There's only two things that can be: the descriptions are not in the admin->Catalog category page or the code for the sub-categories was not added to the index,php file.

 

Jack

Share this post


Link to post
Share on other sites
Oh, I missed the "description part." There's only two things that can be: the descriptions are not in the admin->Catalog category page or the code for the sub-categories was not added to the index,php file.

 

Jack

 

I've added a few descriptions in Admin > Catalog > Category but they don't show up in the shop. I double-checked my index.php code with your install instructions and everything seems to be there. Below is the code. Can you give it a look over?

 

The website is http://fabulalife.com/catalog. By the way, I'm using STS v4_2 if that makes a difference. Thanks!

 

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
  $category_depth = 'products'; // display products
} else {
  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  $category_parent = tep_db_fetch_array($category_parent_query);
  if ($category_parent['total'] > 0) {
	$category_depth = 'nested'; // navigate through the categories
  } else {
	$category_depth = 'products'; // category has no products, but display the 'no products' message
  }
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<?php
 if ($category_depth == 'nested') {

/*** Begin Header Tags SEO ***/

$category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

/*** end Header Tags SEO ***/
$category = tep_db_fetch_array($category_query);
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<?php /*** Begin Header Tags SEO ***/ ?>

	   <td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

	   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

	  </tr>

	   <?php if (tep_not_null($category['categories_htc_description'])) { ?>

	  <tr>

	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

	  </tr>

	  <tr>

	   <td colspan="2"><h2><?php echo $category['categories_htc_description']; ?></h2></td>

	  </tr>

	  <?php } 

	  /*** End Header Tags SEO ***/ 

	  ?>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
<?php
if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
  $category_links = array_reverse($cPath_array);
  for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
	$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
	$categories = tep_db_fetch_array($categories_query);
	if ($categories['total'] < 1) {
	  // do nothing, go through the loop
	} else {
	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
	  break; // we've found the deepest category the customer is in
	}
  }
} else {
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
}

$number_of_categories = tep_db_num_rows($categories_query);

$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
  $rows++;
  $cPath_new = tep_get_path($categories['categories_id']);
  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
  if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
	echo '			  </tr>' . "\n";
	echo '			  <tr>' . "\n";
  }
}

// needed for the new products module shown below
$new_products_category_id = $current_category_id;
?>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>
	  </tr>

	  <!--- BEGIN Header Tags SEO Social Bookmarks -->

	  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 

	   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 

	  ?>

	  <!--- END Header Tags SEO Social Bookmarks -->

	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	   </table></td>
  </tr>
</table></td>
<?php
 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
//sort order

$define_list = array('PRODUCT_LIST_SORT_ORDER' => PRODUCT_LIST_SORT_ORDER,

					 'PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

//end sort order
					 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
					 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
					 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
					 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
					 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
					 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
  if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
  //sort order

	case 'PRODUCT_LIST_SORT_ORDER':

	  $select_column_list .= 'p.products_sort_order, ';

	  break;

//end sort order
	case 'PRODUCT_LIST_MODEL':
	  $select_column_list .= 'p.products_model, ';
	  break;
	case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, ';
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $select_column_list .= 'm.manufacturers_name, ';
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $select_column_list .= 'p.products_quantity, ';
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $select_column_list .= 'p.products_image, ';
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $select_column_list .= 'p.products_weight, ';
	  break;
  }
}

// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
  } else {
// We show them all
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
  }
} else {
// show the products in a given categorie
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  } else {
// We show them all
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  }
}

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	//sort order

	if ($column_list[$i] == 'PRODUCT_LIST_SORT_ORDER') {

	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';

	  $listing_sql .= " order by p.products_sort_order, pd.products_name";



	  break;

	}

	elseif ($column_list[$i] == 'PRODUCT_LIST_NAME' && PRODUCT_LIST_SORT_ORDER==0) {

	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';

	  $listing_sql .= " order by pd.products_name";

//end sort order
	  break;
	}
  }
} else {
  $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
  $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  $listing_sql .= ' order by ';
  switch ($column_list[$sort_col-1]) {
  //sort order

	case 'PRODUCT_LIST_SORT_ORDER':

	  $listing_sql .= "p.products_sort_order , pd.products_name " . ($sort_order == 'a' ? 'asc' : '');

	  break;

//end sort order
	case 'PRODUCT_LIST_MODEL':
	  $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_NAME':
	  $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $listing_sql .= "pd.products_name";
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_PRICE':
	  $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
  }
}
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 $category_query1 = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
  $category1 = tep_db_fetch_array($category_query1);

?>

		<td><h1><?php 
if ($category1['categories_name'] != "") {echo $category1['categories_name'];} else { echo HEADING_TITLE;} 
?></h1></td>
<?php
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0) {
  if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
  } else {
	$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
  }
  $filterlist_query = tep_db_query($filterlist_sql);
  if (tep_db_num_rows($filterlist_query) > 1) {
	echo '			<td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
	if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	  echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
	} else {
	  echo tep_draw_hidden_field('cPath', $cPath);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
	}
	echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
	while ($filterlist = tep_db_fetch_array($filterlist_query)) {
	  $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
	}
	echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
	echo '</form></td>' . "\n";
  }
}

// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['manufacturers_image'];
} elseif ($current_category_id) {
  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['categories_image'];
}
?>
		<?php /*** Begin Header Tags SEO ***/ ?>

	   <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

	  </tr>

	  <?php if (tep_not_null($htc['htc_description'])) { ?>

	  <tr>

	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

	  </tr>

	  <tr>

	   <td colspan="2"><h2><?php echo $htc['htc_description']; ?></h2></td>

	  </tr>

	  <?php } 

	  /*** End Header Tags SEO ***/ 

	  ?>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
 <td>
<?php
$category_query = tep_db_query("select cd.categories_name from " .TABLE_CATEGORIES_DESCRIPTION . " cd where cd.categories_id = '" .(int)$current_category_id . "' and cd.language_id = '" .(int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
$filename = DIR_WS_LANGUAGES . $language . '/descriptions/'.$category['categories_name'].'.php';
if (file_exists($filename)) { 
  include( $filename );
}
include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>
 </td>
</tr>

<!--- BEGIN Header Tags SEO Social Bookmarks -->

	  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 

	   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 

	  ?>

	  <!--- END Header Tags SEO Social Bookmarks --> 

</table></td>
<?php
 } else { // default page
/*** Begin Header Tags SEO ***/

if (isset($HTTP_GET_VARS['manufacturers_id']))

  $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

else

  $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");



$htc = tep_db_fetch_array($db_query);

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

	  <tr>

		<td><h1><?php echo $htc['htc_title']; ?></h1></td>

<?php /*** End Header Tags SEO ***/ ?>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="main"><?php echo tep_customer_greeting(); ?></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_MAIN; ?></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>
	  </tr>
<?php
//	include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
	</table></td>
  </tr>
</table></td>
<?php
 }
?>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites
Having unique titles for the category and products pages is one of the main features of the contribution.

 

Jack

]

 

hmm I must be missing something then?? - My products page works ok and displays both the category the product is in and the product name (as well as the default text of the title).

 

However on the Categories page I get: 'NeddyUp Equestrian Supplies - NeddyUP' on every category. The title for index.php is set as 'NeddyUp Equestrian Supplies' and not sure where why it is displaying 'NeddyUp' rather than the category name?

Share this post


Link to post
Share on other sites
]

 

hmm I must be missing something then?? - My products page works ok and displays both the category the product is in and the product name (as well as the default text of the title).

 

However on the Categories page I get: 'NeddyUp Equestrian Supplies - NeddyUP' on every category. The title for index.php is set as 'NeddyUp Equestrian Supplies' and not sure where why it is displaying 'NeddyUp' rather than the category name?

 

Got it working by unticking Category and ticking it again (the sort order was missing)...I had a few problems with updating the words yesterday:

 

1. There are multiple includes that did not show a sort order but the sort order option box is disabled until you click off and on again.

 

2. My pages were not taking in to affect the changes made on the admin side. I had to delete the pages in header tags seo, then click 'add missing'. When I defined it again they worked. Is this a bug from the upgrade?

Share this post


Link to post
Share on other sites
Got it working by unticking Category and ticking it again (the sort order was missing)...I had a few problems with updating the words yesterday:

 

1. There are multiple includes that did not show a sort order but the sort order option box is disabled until you click off and on again.

 

2. My pages were not taking in to affect the changes made on the admin side. I had to delete the pages in header tags seo, then click 'add missing'. When I defined it again they worked. Is this a bug from the upgrade?

1 - Yes, you have to enable the option to set the sort order.

 

2 - Maybe. but I can't duplicate it.

 

Jack

Share this post


Link to post
Share on other sites

Hey Jack, any thoughts on the index.php code I provided? Or, can you tell me where to specifically look for the code for the sub-categories?

 

Thanks for all your help!

Share this post


Link to post
Share on other sites
Hey Jack, any thoughts on the index.php code I provided? Or, can you tell me where to specifically look for the code for the sub-categories?

 

Thanks for all your help!

No, sorry, but I don't review code.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack - I have no updated to version 3.0.6

 

I still cannot get categories to not include the index header tags.

 

Either I am doing something wrong or the code was not designed to soley use category tags for catgeory pages.

 

Sceanrio:

 

index.php header tags added, boxes checked category and product

 

I create a category and give it its header tages

 

I go to website

 

I do view source on catgeory page

 

I see new category tags appended to index page tags.

 

Please advise.

 

Btw on the index.php page the root box is not checked.

 

 

Many Thanks


Whats the point of a signature?

Share this post


Link to post
Share on other sites

Hi Jack,

 

Sorry... I am back like a bad penny. :P

 

I am not sure if I am doing things correctly or messing things up (or messed up something in the installation) or if all is ok.

 

Here's my situation:

 

I have fill tags (all 3) set to "Fill only empty tags".

When I revisit that page they are back to "Skip all tags".

 

In the "Page Control" section I have the "Default Tags" set for only the Title - ":: Hande's Hobbies :: .

 

Now here's where things get a little messy, on the left for filling in the individual pages.

 

sortordergm8.gif

 

If I leave just - Include > Default Title: ticked/checked all "seems" fine.

Results =

 

Category - "Car Models"

 

<head>

<title>:: Hande's Hobbies :: - Car Models</title>

<meta name="Description" content="Online shopping for models, railroading, bead jewelry, tools and supplies" />

<meta name="Keywords" content="Hobby, hobbies, shop, models, railroading, jewelry, supplies, tools" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

Sub-Category - "1920 - 1949"

 

<head>

<title>:: Hande's Hobbies :: - 1920 - 1949</title>

<meta name="Description" content="Online shopping for models, railroading, bead jewelry, tools and supplies" />

<meta name="Keywords" content="Hobby, hobbies, shop, models, railroading, jewelry, supplies, tools" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

Product Page - "1924 Ford T Roadster w/ trailer"

 

<head>

<title>:: Hande's Hobbies :: - 1924 Ford T Roadster w/ trailer</title>

<meta name="Description" content="Revell 1924 Ford T Roadster w/ trailer - RMX/85-2022" />

<meta name="Keywords" content="Revell, 1924 Ford, T Roadster, RMX/85-2022" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

 

 

If I tick/check Include > Category: without a number in the box I receive this message - Missing sort orders are not allowed ->

I'll assume that is a correct function. When I add a number (any number) to Category the message does not appear but I end up with this -

 

Category - "Car Models"

 

<head>

<title>:: Hande's Hobbies :: - Car Models</title>

<meta name="Description" content="Online shopping for models, railroading, bead jewelry, tools and supplies - Car Models" />

<meta name="Keywords" content="Hobby, hobbies, shop, models, railroading, jewelry, supplies, tools , Car Models" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

Sub-Category - "1920 - 1949"

 

<head>

<title>:: Hande's Hobbies :: - 1920 - 1949</title>

<meta name="Description" content="Online shopping for models, railroading, bead jewelry, tools and supplies - 1920 - 1949" />

<meta name="Keywords" content="Hobby, hobbies, shop, models, railroading, jewelry, supplies, tools , 1920 - 1949" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

Product Page - "1924 Ford T Roadster w/ trailer"

 

<head>

<title>:: Hande's Hobbies :: - 1924 Ford T Roadster w/ trailer</title>

<meta name="Description" content="Revell 1924 Ford T Roadster w/ trailer - RMX/85-2022" />

<meta name="Keywords" content="Revell, 1924 Ford, T Roadster, RMX/85-2022" />

<blah, blah, blah>

<!-- EOF: Header Tags SEO Generated Meta Tags -->

 

The Category and Sub-Categories seem to get appended to the end.

Is that normal or did I mess something up?

If it is normal having them on the end, do I want that or turn it off?

 

Sorry for such a long post and being a pain in the butt. :(


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites
Hi Jack - I have no updated to version 3.0.6

 

I still cannot get categories to not include the index header tags.

 

Either I am doing something wrong or the code was not designed to soley use category tags for catgeory pages.

What type of cart are you using? If standard, then I don't have an answer for you. The code does work. It is either due to your setup or installation. If it is STS or BTS, be sure you followed the alternate install instructions.

 

Jack

Share this post


Link to post
Share on other sites
What type of cart are you using? If standard, then I don't have an answer for you. The code does work. It is either due to your setup or installation. If it is STS or BTS, be sure you followed the alternate install instructions.

 

Jack

 

Hi Jack

 

I have the standard cart I beleive - oscommerec 2.2rc2

 

 

I will go through all the code once more and try and find why it appends the tags, otherwise a work around maybe to reduce the index tag descriptions so that when catgories are added they do not go beyond there maximum legnth

 

Lastly I still have an issue with adding the big descriptions to the categories and images. On the firts time a create a category the big description is not added if I go back and add the big description the image goes missing.

 

If you have any last advice here - I will really appreciate it.

 

Many Thanks

 

TMM


Whats the point of a signature?

Share this post


Link to post
Share on other sites

BTW

 

I think that the code is working correctly.

 

Even for product_info.php what ever tags I fill in there and then create a new product the new product tags get appended to those I set in header tags seo through admin.

 

So all I do is not add anything for product_info.php in admin and that way I only get the tags I set in for each product.

 

Unfortunately this cannot be done for index.php as it will fix the category problem but will mean that the home page has no tags.

 

I know last time you mentioned that you added a new feature called root maybe I can test that I dont know if that will solve the problem.

 

Thnaks


Whats the point of a signature?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×