Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

I should be more specific about the other contributions. I installed Display Categories and Products & Category Descriptions made Simple successfully before I found and installed Header Tags SEO.

Share this post


Link to post
Share on other sites
After installing this contribution the layout of my product page got shift to the right and it looks awful. Here is what it looks like. I had lightbox and ultimate images and a few other contributions installed which made changes to the product.php file prior to this install.

 

Can anyone help?

It most likely means you made a mistake with the edits for that page. You should back them out and do them one at a time until you find the problem. There is a completed file in the package you can compare against.

 

Jack

Share this post


Link to post
Share on other sites

I have search this forum, but had no luck in finding an answer to my problem.

 

When viewing the source of any page my headertags have a / before each closing > I have copied the top of a view source page. I hope someone could tell me why its there.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html dir="LTR" lang="en"><head><title>Metal - Railwayscenics - - Rusty galvanised steel sheeting in 4mm ft OO scale</title><meta name="Description" content="Railwayscenics - - Rusty galvanised steel sheeting in 4mm ft OO scale" /><meta name="Keywords" content="Metal - Railwayscenics , Railwayscenics , *** No keywords found for this page: product_info.php?language=en , Rusty galvanised steel sheeting in 4mm ft OO scale" /><meta name="robots" content="noodp" /><meta name="slurp" content="noydir" /><meta name="robots" content="index, follow" /><link rel="canonical" href="http://www.railwayscenics.com/rusty-galvanised-steel-sheeting-scale-p-81.html" /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

 

The slashes i have highlighted in red.

 

I only noticed this when i tried to validate the web site.

 

Anyone have a clue as to why they are there.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Hi!

 

I try to install Header Tags SEO with STS.

 

When I the test the installation in Admin it says that some of the files are missing butwhen I see in the install instruction I have installed them in the right place in the admin catalog but the test program expect them to be in the catalog folder and catalog/includes.

 

When I install the contribution with STS, which files in the Catalog part must be changed?

 

Under files changes in the Install_Catalog.txt file it say NOTE: STS USERS ONLY - Skip to step 1A.

But must I make the following change in index.php and product_info.php or is it for them that not have STS installed?

 

--------------------------------------

FIND:

 

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

<title><?php echo TITLE; ?></title>

 

REPLACE with the following then continue with Step 2:

 

<?php

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

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

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

?>

---------------------------------------

 

Should I after step 1A continue with step 2-10 in the Install_Catalog.txt file?

Share this post


Link to post
Share on other sites
I have search this forum, but had no luck in finding an answer to my problem.

 

When viewing the source of any page my headertags have a / before each closing > I have copied the top of a view source page. I hope someone could tell me why its there.

See the includes/heade_tags.php file.

 

Jack

Share this post


Link to post
Share on other sites
Hi!

 

I try to install Header Tags SEO with STS.

 

When I the test the installation in Admin it says that some of the files are missing butwhen I see in the install instruction I have installed them in the right place in the admin catalog but the test program expect them to be in the catalog folder and catalog/includes.

 

When I install the contribution with STS, which files in the Catalog part must be changed?

 

Under files changes in the Install_Catalog.txt file it say NOTE: STS USERS ONLY - Skip to step 1A.

But must I make the following change in index.php and product_info.php or is it for them that not have STS installed?

 

Should I after step 1A continue with step 2-10 in the Install_Catalog.txt file?

The instructions to make the changes to those files is in step 1. But at the beginning of step one, it says to skip it if STS is being installed. So, if you skip step 1, that would mean not to perform the steps in it.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

One question and one reminder!!!

 

Reminder

 

Thanks for the advice regarding alt text in logo image firefox

 

FireFox won't display it unless the title tag is used. So change

CODE

<img src="images/Chefs-Recommended2.png" alt="$headertags_logotext"></td>

to this

CODE

<img src="images/Chefs-Recommended2.png" alt="$headertags_logotext" title="$headertags_logotext"></td>

 

Hi Jack,

 

Working perfectly now thanks for a fantasic contribution!!

 

Number one in Google here I come :lol:

 

John

 

I think if you remember should be included in the STS install.

 

******************************************************

 

The question is in application_top about line 525

 

should we be using

} elseif (isset($_GET['manufacturers_id'])) {

$manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' LIMIT 1");

if (tep_db_num_rows($manufacturers_query)) {

$manufacturers = tep_db_fetch_array($manufacturers_query);

$breadcrumb->add($manufacturers['manufacturers_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id']));

}

}

 

// add the products name to the breadcrumb trail

if (isset($_GET['products_id'])) {

$products_query = tep_db_query("select pd.products_head_title_tag from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id ='" . (int)$languages_id . "' LIMIT 1");

if (tep_db_num_rows($products_query)) {

$products = tep_db_fetch_array($products_query);

$breadcrumb->add($products['products_head_title_tag'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));

}

}

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

 

Or

 

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {

$manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' LIMIT 1");

if (tep_db_num_rows($manufacturers_query)) {

$manufacturers = tep_db_fetch_array($manufacturers_query);

$breadcrumb->add($manufacturers['manufacturers_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

}

}

 

// add the products name to the breadcrumb trail

if (isset($HTTP_GET_VARS['products_id'])) {

$products_query = tep_db_query("select pd.products_head_title_tag from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id ='" . (int)$languages_id . "' LIMIT 1");

if (tep_db_num_rows($products_query)) {

$products = tep_db_fetch_array($products_query);

$breadcrumb->add($products['products_head_title_tag'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));

}

}

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

 

 

Not sure about this just having a bit of hassle with upgrade to php 5

 

John

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites
The instructions to make the changes to those files is in step 1. But at the beginning of step one, it says to skip it if STS is being installed. So, if you skip step 1, that would mean not to perform the steps in it.

 

Jack

 

I thought so. I have STS installed and did not make that change. Should I after step 1A continue with step 2-10 in the Install_Catalog.txt file if I have STS installed? It seems to work for me without changing the index.php and product_info.php files.

Share this post


Link to post
Share on other sites
Hi Jack,

 

One question and one reminder!!!

 

Reminder

 

Thanks for the advice regarding alt text in logo image firefox

 

FireFox won't display it unless the title tag is used. So change

<img src="images/Chefs-Recommended2.png" alt="$headertags_logotext" title="$headertags_logotext"></td>

 

I think if you remember should be included in the STS install.

 

******************************************************

 

The question is in application_top about line 525

 

should we be using

} elseif (isset($_GET['manufacturers_id'])) {

$manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " .

The standard oscommerce code, which is what this is made for, uses the tep_image function and that function automatically adds the title attribute. If your site doesn't use the tep_image function, then you should make that change but the contribution can't be coded for non-standard shops.

 

$_GET and $_POST should always be used instead of $_HTTP_GET_VARS and $_HTTP_POST_VARS. But since the oscommerce code uses the latter and the included files are based on that, those older versions are used. If your shop has been converted to use the newer variables, then you should change those. Otherwise, it won't make any difference due to the way the older ones are used throughout.

 

Jack

Share this post


Link to post
Share on other sites
I thought so. I have STS installed and did not make that change. Should I after step 1A continue with step 2-10 in the Install_Catalog.txt file if I have STS installed? It seems to work for me without changing the index.php and product_info.php files.

In any set of instructions, you proceed from the first to the last unless you are told to skip or stop. I don't see any instruction to skip or stop before step 2.

 

Jack

Share this post


Link to post
Share on other sites
See the includes/heade_tags.php file.

 

Jack

 

Jack.

 

Many thanks. have sorted problem now. great contribution by the way.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Hi Jack,

 

Thank you for all the good work you put into these contributions. I just installed 3.1.5. Everything appears functional at first glance. However, during installation of Admin, I noticed a few discrepancies. In admin\categories.php, your installation notes instructed;

 

FIND (a few lines down - around line 72)

 

$sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]));

 

REPLACE with

 

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

$sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),

'categories_htc_title_tag' => (tep_not_null($categories_htc_title_array[$language_id]) ? tep_db_prepare_input($categories_htc_title_array[$language_id]) : tep_db_prepare_input($categories_name_array[$language_id])),

'categories_htc_desc_tag' => (tep_not_null($categories_htc_desc_array[$language_id]) ? tep_db_prepare_input($categories_htc_desc_array[$language_id]) : tep_db_prepare_input($categories_name_array[$language_id])),

'categories_htc_keywords_tag' => (tep_not_null($categories_htc_keywords_array[$language_id]) ? tep_db_prepare_input($categories_htc_keywords_array[$language_id]) : tep_db_prepare_input($categories_name_array[$language_id])),

'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]));

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

 

But in brand new installation categories.php file;

 

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

$sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),

'categories_htc_title_tag' => (tep_not_null($categories_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_title_array[$language_id])) : tep_db_prepare_input(strip_tags($categories_name_array[$language_id]))),

'categories_htc_desc_tag' => (tep_not_null($categories_htc_desc_array[$language_id]) ? tep_db_prepare_input($categories_htc_desc_array[$language_id]) : tep_db_prepare_input($categories_name_array[$language_id])),

'categories_htc_keywords_tag' => (tep_not_null($categories_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_keywords_array[$language_id])) : tep_db_prepare_input(strip_tags($categories_name_array[$language_id]))),

'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]));

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

 

I noticed a couple of lines has strip_tags() wrapped. There are a few of the same discrepancies further down. I am not sure which is the correct one. Thank you

Share this post


Link to post
Share on other sites
Hi Jack,

 

Thank you for all the good work you put into these contributions. I just installed 3.1.5. Everything appears functional at first glance. However, during installation of Admin, I noticed a few discrepancies. In admin\categories.php, your installation notes instructed;

 

I noticed a couple of lines has strip_tags() wrapped. There are a few of the same discrepancies further down. I am not sure which is the correct one. Thank you

Thank you for pointing out the mistake. The correct code is the one with the strip_tags that is in the files. I'll include this fix in the next release.

 

Jack

Share this post


Link to post
Share on other sites

hi

 

got a strange problem..i been running my site for a while.I noticed something strange today ( i never checked this before) .

 

 

When i select yes to fill in product discription and i limit to to 300 characters . Page meta discription is a copy of products title .I checked the meta tag table in databse and all it has is the page title.I been looking at the code changes that were made to different files but cant seem to find where the problem is.Any help as to which file i should be looking at would help .

 

any help would be appreciated..

 

kind regards

 

nafri

Share this post


Link to post
Share on other sites
When i select yes to fill in product discription and i limit to to 300 characters . Page meta discription is a copy of products title .I checked the meta tag table in databse and all it has is the page title.I been looking at the code changes that were made to different files but cant seem to find where the problem is.Any help as to which file i should be looking at would help .

The limit is only available in Fill Tags. When you select it, you still have to select the choices at the bottom of the page (Fill All, Fill Empty...). Once that is done, the meta decription in the products edit page should contain that text.

 

Jack

Share this post


Link to post
Share on other sites
I'm not sure I understand the problem but if the product page is not showing correctly in a different language than English, then you may have missed the edit in the product_info.php file for the language file of that language.

 

Jack

 

 

 

Thanks Jack

 

 

for example:

 

 

in product_info.php , the bottom of this page have a line:"currently view:DVD-Mice-". and then I choice the store's language to GENMANY, the line turns to "currently view: ", and have no the "DVD-Mice".

 

 

thanks

 

 

 

Regards

 

 

JUN

Share this post


Link to post
Share on other sites
in product_info.php , the bottom of this page have a line:"currently view:DVD-Mice-". and then I choice the store's language to GENMANY, the line turns to "currently view: ", and have no the "DVD-Mice".

That comes from the Header Tags title for the product. Go into the products edit page for that product and make sure there is a German entry for the Header Tags title.

 

Jack

Share this post


Link to post
Share on other sites
The limit is only available in Fill Tags. When you select it, you still have to select the choices at the bottom of the page (Fill All, Fill Empty...). Once that is done, the meta decription in the products edit page should contain that text.

 

Jack

thanks jack.. it worked..

Share this post


Link to post
Share on other sites

hello there,

 

i got a quick question, regarding product_info changed code.

 

for

 

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

 

REPLACE with

 

<?php /*** Begin Header Tags SEO ***/ ?>

<td valign="top"><h1><?php echo $products_name; ?></h1></td>

<td align="right" valign="top"><h1><?php echo $products_price; ?></h1></td>

<?php /*** End Header Tags SEO ***/ ?>

 

my question is simple:

 

I've commented out those 2 lines like this

 

<td class="pageHeading" valign="top"><?php /* echo $products_name; */ ?></td>

<td class="pageHeading" align="right" valign="top"><?php /*echo $products_price; */ ?></td>

 

because im using graphical border command tip

 

<?php echo mws_boxHeader (); ?>.......<?php echo mws_boxFooter (); ?>

 

to box out my whole product info page.

 

i've added command for title like this...so my product title goes in the top of that box, exactly like any colum right, left box have there title at top of it.

 

<?php echo mws_boxHeader ($product_info['products_name']); ?>

 

will there be any problem if i don't add the mentioned code change for header tag??

 

all other product_info must change for header tag are done...

the one changing meta and title lines at top of page

and the other under <body> tag

im not mentinioning social bookmark and currently viewing..but it's done also. but are not a Must to make header work on a specific page if i uderstood correctly.

 

this seems to be working without the change in the first quote , i just want to make sure it won't cause any problems.

 

Typically what is exactly doing that code change? im not sure exactly, i just see a simple change....deletiing class and adding h1 tag.

 

Thank you for info! Regards

Edited by Lgn.Magic

Share this post


Link to post
Share on other sites
this seems to be working without the change in the first quote , i just want to make sure it won't cause any problems.

 

Typically what is exactly doing that code change? im not sure exactly, i just see a simple change....deletiing class and adding h1 tag.

It won't cuase any problems. You just lose the use of the h1 tag, which is an advantage for the search engines.

 

Jack

Share this post


Link to post
Share on other sites

Hmmm ok thank you for info...

 

I just tried to add the code to see how it display..since some time ago if i uncommented those lines, title price was going out of my box...i've modified my prod_info since that, and now it's seems to be shown correctly into my box...

 

So i could eventually delet $rpoduct_info call into my box header and use header tag seo code change

 

<?php echo mws_boxHeader ($product_info['products_name']); ?> to <?php echo mws_boxHeader (); ?>

 

but i'd rather don't use the price line since i've got attributes and show the max price when i got different price for attribute is a little messy

 

no problem if im not using h1 for price ....i just lose the advantage for h1 tag in price line, if i understood your post, right?

 

Seems better to take advantage of the h1 tag use...but it shouldn't be such an "issue" for price...if at least i've it for title..no?

Edited by Lgn.Magic

Share this post


Link to post
Share on other sites
Seems better to take advantage of the h1 tag use...but it shouldn't be such an "issue" for price...if at least i've it for title..no?

The h1 is applied to the price because on standard shops, the price is beside the name and having different sized fonts would make it look funny. It does not help with SEO.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

I am getting the following errors in the test section:

Missing File Error: explain

Cannot find file /hsphere/local/home/xxx/header_tags_seo.php.

Cannot find file /hsphere/local/home/xxx/header_tags_fill_tags.php.

Cannot find file /hsphere/local/home/xxx/includes/header_tags_seo_words.txt.

Cannot find file /hsphere/local/home/xxx/includes/boxes/header_tags_seo.php.

Cannot find file /hsphere/local/home/xxx/includes/languages/english/header_tags_seo.php.

 

However all of the files in the contribution were put into EXACTLY the directory they came from, for example the first one "header_tags_seo.php", there are not any files whatsoever in the root of the contribution, unless I am supposed to take the files of the same name from elsewhere?

Share this post


Link to post
Share on other sites
I am getting the following errors in the test section:

Missing File Error: explain

Cannot find file /hsphere/local/home/xxx/header_tags_seo.php.

Cannot find file /hsphere/local/home/xxx/header_tags_fill_tags.php.

Cannot find file /hsphere/local/home/xxx/includes/header_tags_seo_words.txt.

Cannot find file /hsphere/local/home/xxx/includes/boxes/header_tags_seo.php.

Cannot find file /hsphere/local/home/xxx/includes/languages/english/header_tags_seo.php.

 

However all of the files in the contribution were put into EXACTLY the directory they came from, for example the first one "header_tags_seo.php", there are not any files whatsoever in the root of the contribution, unless I am supposed to take the files of the same name from elsewhere?

There appears to be something wrong with your configure file since those files go in the admin directory but the test code is looking in the shop directory.

 

Jack

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

×