Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header tag controller help please.


ioasw

Recommended Posts

I do this for the about_us.php page:

 

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>

REPLACE with:

<?php
// BOF: Header Tag Controller v2.5.7
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: Header Tag Controller v2.5.7
?>

 

 

and then I go to add a new page in admin and this is the entry I get in the header_tags.php:

   // about_us.PHP - was default.php
  case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US) ):
  $tags_array = tep_header_tag_page(HTTA_ABOUTUS_ON, HEAD_TITLE_TAG_ABOUTUS,
								 HTDA_ABOUTUS_ON, HEAD_DESC_TAG_ABOUTUS,
								 HTKA_ABOUTUS_ON, HEAD_KEY_TAG_ABOUTUS );
  break;


// about_us.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US));
$tags_array = tep_header_tag_page(HTTA_ABOUT_US_ON, HEAD_TITLE_TAG_ABOUT_US, 
								  HTDA_ABOUT_US_ON, HEAD_DESC_TAG_ABOUT_US, 
								  HTKA_ABOUT_US_ON, HEAD_KEY_TAG_ABOUT_US );
  break;

 

and it isn't working, the tags aren't showing up. the entry that I am getting for the about_us page is very different to the stock entries included in the header tag contribution.

 

For example this is what I get for the index.php entry, and they all look about like this:

// 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;
  }   
}

if (HTTA_DEFAULT_ON=='1') {
  if ($showCatTags == true) {
	if (HTTA_CAT_DEFAULT_ON=='1') {
	  $tags_array['title']= $the_category['htc_title_tag'] .' '.  HEAD_TITLE_TAG_DEFAULT . " " .  $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
	} else {
	  $tags_array['title']= $the_category['htc_title_tag'] .' '.  $the_manufacturers['manufacturers_htc_title_tag'] . ' - ' . HEAD_TITLE_TAG_ALL;
	}
  } else {
	$tags_array['title']= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['name'] . $the_manufacturers['manufacturers_htc_title_tag'] . ' - ' . HEAD_TITLE_TAG_ALL;
  }
} else {
  if ($showCatTags == true) {
	if (HTTA_CAT_DEFAULT_ON=='1') {
	  $tags_array['title']= $the_category['htc_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
	} else {
	  $tags_array['title']= $the_category['htc_title_tag'];
	} 
  } else {
	$tags_array['title']= HEAD_TITLE_TAG_DEFAULT;
  }  
}

break;

 

Can anyone tell me what is going on here? I tried many different things but they don't seem to work. Thank you.

Link to comment
Share on other sites

Was the about us code added to includes/header_tags.php? Does a section ofr about us show up in admin->Header Tags->Text Control?

 

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...