Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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?

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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.

 

Link to comment
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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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..

Link to comment
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
Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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
Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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?

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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

 

Hi Jack,

 

Many thanks for the prompt reply, yes I noticed that the define('DIR_FS_ADMIN' in the admin config only had the directory of the root of the site contained, instead of the full path to the Admin folder. Strange how it didnt seem to affect anything else though, but anyway have added in the /admin/ directory and the entire "missing files" section has disappeared from the TEST page.

 

Thanks for your help :)

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