Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Reviews Titile meta tags


Madman00

Recommended Posts

I noticed that product reviews have no unique page titile that matches the product being viewed in reviews. Google is always crawling the reviews section, and it could help the ranking dramatically if thier was a unique title and meta tag for every product being viewed in this sections. How can this be done.

 

Cheers

Link to comment
Share on other sites

I have the header tag controller installed. It doesn't do the job. The reviews section have the main index title. When you click on the product that you want to read reviews on, you still see the main index title and no the actual product title.

 

If you install the Header Tags Controller contribution it will handle this for you.

 

Jack

Link to comment
Share on other sites

Do you have a title set for reviews in includes/languages/english/header_tags.php? If you do, it will override the products description so you will never see it.

 

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

I have the Dynamic Product Meta Tags Contribution installed. I don't have the Meta tag controller installed. How are the 2 contributions different. I thought they did the same job.

 

Do you have a title set for reviews in includes/languages/english/header_tags.php?  If you do, it will override the products description so you will never see it.

 

Jack

Link to comment
Share on other sites

OH, above you said you had HTC installed. No matter though. The difference is that Dynamic Product just changes the tags for products. It is fine for what it does. You can think of it as a subset of HTC. The reason for doing all of this is to help with the SE's. The title of your page is much more important to the SE's than meta tags yet this contribution doesn't touch the title, other than for products. HTC does.

 

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

Ok great, so having the dynamic product meta tag installed, how can i have a unique title for every product in the reviews section. like if the product was sony stereo let's say, i want the title to show sony strereo reviews as a title. or just ony stereo (matching the header)

 

Cheers,

 

OH, above you said you had HTC installed.  No matter though.  The difference is that Dynamic Product just changes the tags for products.  It is fine for what it does.  You can think of it as a subset of HTC.  The reason for doing all of this is to help with the SE's.  The title of your page is much more important to the SE's than meta tags yet this contribution doesn't touch the title, other than for products. HTC does. 

 

Jack

Link to comment
Share on other sites

You can't since Dynamic Meta Tags can't handle it. Re-read my last post. If you want to do this, install Header Tags.

 

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

Header Tags Controller contribution is now installed. Everything is workign well. One thing, how do we get the product_reviews_write.php to display a unique product title. Beside modifying product_reviews_write.php. WHat other files do we have to modify to get it working.

 

You can't since Dynamic Meta Tags can't handle it.  Re-read my last post.  If you want to do this, install Header Tags.

 

Jack

Link to comment
Share on other sites

The titles for the Review pages don't work if you have title set for them in enlgish/header_tags.php. So your entry for this page should look like

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE',' ');

 

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

I added the following to english/header_tags.php.

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE',' ');

 

I modified Product_reviews_write.php as it should be:

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// Replaced by header_tags.php

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

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

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

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v1.0

?>

 

I still don't get a unique titile header for every product in review write.

What could be causing this to happen.

 

Thanks for your help jack

 

 

The titles for the Review pages don't work if you have title set for them in enlgish/header_tags.php.  So your entry for this page should look like
define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE',' ');

 

Jack

Link to comment
Share on other sites

I added the following to english/header_tags.php.

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE',' ');

This isn't what I meant. That file already has the define in there. Remove the one you added and then search the file for the existing one. Make sure it is empty.
I modified Product_reviews_write.php as it should be:
I assumed this was already done since it is part of the installation. Since it wasn't, I'm wondering if there are other steps that were missed?
I still don't get a unique titile header for every product in review write.

What could be causing this to happen.

See above.

 

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

The file didn't have a define. I had to define it. I didn't use the autoinstall feature that came with the contritbution, i just made it manually. Here how the header_tag.php looks like for reviews

 

// product_reviews_info.php and product_reviews.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTKA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTDA_PRODUCT_REVIEWS_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE','');

 

This isn't what I meant.  That file already has the define in there. Remove the one you added and then search the file for the existing one.  Make sure it is empty.

I assumed this was already done since it is part of the installation.  Since it wasn't, I'm wondering if there are other steps that were missed?

See above.

 

Jack

Link to comment
Share on other sites

If the file didn't have a define, then you have a corrupted file. Look at the file from the contribution and you will see it does have it in there.

 

It's not necessary to use the autoinstall feature but you do have to make all of the required chages for the contribution to work properly. Did you change your includes/application_top.php file? Did you upload the SQL file? It sounds like you have either a bad copy of the contribution or it wasn't installed correctly. You should go over the instructions and make sure it is all as it should be.

 

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

What modifications are made to/catalog/includes/application_top.php other then this:

 

require(DIR_WS_FUNCTIONS . 'header_tags.php');

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Also added the 3 SQl lines. What could be missing. That's how my header_tag looks like:

 

<?php

// /catalog/includes/languages/english/header_tags.php

// WebMakers.com Added: Header Tags Generator v2.3

// Add META TAGS and Modify TITLE

//

// DEFINITIONS FOR /includes/languages/english/header_tags.php

 

// Define your email address to appear on all pages

define('HEAD_REPLY_TAG_ALL',STORE_OWNER_EMAIL_ADDRESS);

 

// For all pages not defined or left blank, and for products not defined

// These are included unless you set the toggle switch in each section below to OFF ( '0' )

// The HEAD_TITLE_TAG_ALL is included BEFORE the specific one for the page

// The HEAD_DESC_TAG_ALL is included AFTER the specific one for the page

// The HEAD_KEY_TAG_ALL is included AFTER the specific one for the page

define('HEAD_TITLE_TAG_ALL','abc');

define('HEAD_DESC_TAG_ALL','abc');

define('HEAD_KEY_TAG_ALL','abc');

 

// DEFINE TAGS FOR INDIVIDUAL PAGES

 

// index.php

define('HTTA_DEFAULT_ON','1'); // Include HEAD_TITLE_TAG_ALL in Title

define('HTKA_DEFAULT_ON','1'); // Include HEAD_KEY_TAG_ALL in Keywords

define('HTDA_DEFAULT_ON','1'); // Include HEAD_DESC_TAG_ALL in Description

define('HEAD_TITLE_TAG_DEFAULT', '');

define('HEAD_DESC_TAG_DEFAULT','abc');

define('HEAD_KEY_TAG_DEFAULT','abc');

 

// product_info.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_INFO_ON','1');

define('HTKA_PRODUCT_INFO_ON','1');

define('HTDA_PRODUCT_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_INFO','');

define('HEAD_DESC_TAG_PRODUCT_INFO','');

define('HEAD_KEY_TAG_PRODUCT_INFO','');

 

// products_new.php - whats_new

define('HTTA_WHATS_NEW_ON','1');

define('HTKA_WHATS_NEW_ON','1');

define('HTDA_WHATS_NEW_ON','1');

define('HEAD_TITLE_TAG_WHATS_NEW','New Products');

define('HEAD_DESC_TAG_WHATS_NEW','I am ON PRODUCTS_NEW as HEAD_DESC_TAG_WHATS_NEW and over ride the HEAD_DESC_TAG_ALL');

define('HEAD_KEY_TAG_WHATS_NEW','I am on PRODUCTS_NEW as HEAD_KEY_TAG_WHATS_NEW and over ride HEAD_KEY_TAG_ALL');

 

// specials.php

// If HEAD_KEY_TAG_SPECIALS is left blank, it will build the keywords from the products_names of all products on special

define('HTTA_SPECIALS_ON','1');

define('HTKA_SPECIALS_ON','1');

define('HTDA_SPECIALS_ON','1');

define('HEAD_TITLE_TAG_SPECIALS','Specials');

define('HEAD_DESC_TAG_SPECIALS','');

define('HEAD_KEY_TAG_SPECIALS','');

 

// product_reviews_info.php and product_reviews.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTKA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTDA_PRODUCT_REVIEWS_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE','');

 

?>

 

If the file didn't have a define, then you have a corrupted file.  Look at the file from the contribution and you will see it does have it in there. 

 

It's not necessary to use the autoinstall feature but you do have to make all of the required chages for the contribution to work properly.  Did you change your includes/application_top.php file?  Did you upload the SQL file?  It sounds like you have either a bad copy of the contribution or it wasn't installed correctly.  You should go over the instructions and make sure it is all as it should be.

 

Jack

Link to comment
Share on other sites

I think the problem is from includes/header_tags.php. here is what i have for reviews. thier is nothing about product_reviews_write.php.

 

// PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP

case ( strstr($_SERVER['PHP_SELF'],'product_reviews_info.php') or strstr($_SERVER['PHP_SELF'],'product_reviews.php') or strstr($PHP_SELF,'product_reviews_info.php') or strstr($PHP_SELF,'product_reviews.php') ):

if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_DESC_TAG_ALL;

} else {

$the_desc= tep_get_header_tag_products_desc(isset($HTTP_GET_VARS['reviews_id']));

}

} else {

$the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO;

}

 

if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTKA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$the_key_words= tep_get_header_tag_products_keywords(isset($HTTP_GET_VARS['reviews_id'])) . ' ' . HEAD_KEY_TAG_ALL;

} else {

$the_key_words= tep_get_header_tag_products_keywords(isset($HTTP_GET_VARS['reviews_id']));

}

} else {

$the_key_words= HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO;

}

 

if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO=='' ) {

if ( HTTA_PRODUCT_REVIEWS_INFO_ON=='1' ) {

$the_title= tep_get_header_tag_products_title(isset($HTTP_GET_VARS['reviews_id'])) . ' - ' . HEAD_TITLE_TAG_ALL;

} else {

$the_title= tep_get_header_tag_products_title(isset($HTTP_GET_VARS['reviews_id']));

}

} else {

$the_title= HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO;

}

 

break;

 

What modifications are made to/catalog/includes/application_top.php other then this:

 

  require(DIR_WS_FUNCTIONS . 'header_tags.php');

  require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Also added the 3 SQl lines. What could be missing. That's how my header_tag looks like:

 

<?php

// /catalog/includes/languages/english/header_tags.php

// WebMakers.com Added: Header Tags Generator v2.3

// Add META TAGS and Modify TITLE

//

// DEFINITIONS FOR /includes/languages/english/header_tags.php

 

// Define your email address to appear on all pages

define('HEAD_REPLY_TAG_ALL',STORE_OWNER_EMAIL_ADDRESS);

 

// For all pages not defined or left blank, and for products not defined

// These are included unless you set the toggle switch in each section below to OFF ( '0' )

// The HEAD_TITLE_TAG_ALL is included BEFORE the specific one for the page

// The HEAD_DESC_TAG_ALL is included AFTER the specific one for the page

// The HEAD_KEY_TAG_ALL is included AFTER the specific one for the page

define('HEAD_TITLE_TAG_ALL','abc');

define('HEAD_DESC_TAG_ALL','abc');

define('HEAD_KEY_TAG_ALL','abc');

 

// DEFINE TAGS FOR INDIVIDUAL PAGES

 

// index.php

define('HTTA_DEFAULT_ON','1'); // Include HEAD_TITLE_TAG_ALL in Title

define('HTKA_DEFAULT_ON','1'); // Include HEAD_KEY_TAG_ALL in Keywords

define('HTDA_DEFAULT_ON','1'); // Include HEAD_DESC_TAG_ALL in Description

define('HEAD_TITLE_TAG_DEFAULT', '');

define('HEAD_DESC_TAG_DEFAULT','abc');

define('HEAD_KEY_TAG_DEFAULT','abc');

 

// product_info.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_INFO_ON','1');

define('HTKA_PRODUCT_INFO_ON','1');

define('HTDA_PRODUCT_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_INFO','');

define('HEAD_DESC_TAG_PRODUCT_INFO','');

define('HEAD_KEY_TAG_PRODUCT_INFO','');

 

// products_new.php - whats_new

define('HTTA_WHATS_NEW_ON','1');

define('HTKA_WHATS_NEW_ON','1');

define('HTDA_WHATS_NEW_ON','1');

define('HEAD_TITLE_TAG_WHATS_NEW','New Products');

define('HEAD_DESC_TAG_WHATS_NEW','I am ON PRODUCTS_NEW as HEAD_DESC_TAG_WHATS_NEW and over ride the HEAD_DESC_TAG_ALL');

define('HEAD_KEY_TAG_WHATS_NEW','I am on PRODUCTS_NEW as HEAD_KEY_TAG_WHATS_NEW and over ride HEAD_KEY_TAG_ALL');

 

// specials.php

// If HEAD_KEY_TAG_SPECIALS is left blank, it will build the keywords from the products_names of all products on special

define('HTTA_SPECIALS_ON','1');

define('HTKA_SPECIALS_ON','1');

define('HTDA_SPECIALS_ON','1');

define('HEAD_TITLE_TAG_SPECIALS','Specials');

define('HEAD_DESC_TAG_SPECIALS','');

define('HEAD_KEY_TAG_SPECIALS','');

 

// product_reviews_info.php and product_reviews.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTKA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTDA_PRODUCT_REVIEWS_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE','');

 

?>

Link to comment
Share on other sites

Argh! I have a number of versions on my computer and was looking at the wrong one. You are correct, that is not included in the base install. HTC only comes with a few pages setup. If you want it to work for other pages, you have to add the code for it. Add the following to your includes/header_tags.php file.

// PRODUCTS_REVIEWS_WRITE.PHP
   case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE)):
   if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTDA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $the_desc= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $the_desc= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE;
   }

   if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTKA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $the_key_words= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $the_key_words= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $the_key_words= HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE;
   }

   if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTTA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $the_title= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;
     } else {
       $the_title= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $the_title= HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE;
   }
   break;

and add the following to english/header_tags.php

// product_reviews_write.php - if left blank in products_description table these values will be used
define('HTTA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HTKA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HTDA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE','');
define('HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE','');
define('HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE','');

I'm sorry for the confusion.

 

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

Done, everything works fine now. Thanks you.

 

Argh!  I have a number of versions on my computer and was looking at the wrong one.  You are correct, that is not included in the base install.  HTC only comes with a few pages setup.  If you want it to work for other pages, you have to add the code for it.  Add the following to your includes/header_tags.php file.
// PRODUCTS_REVIEWS_WRITE.PHP
? ?case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE)):
? ?if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
? ? ?if ( HTDA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
? ? ? ?$the_desc= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;
? ? ?} else {
? ? ? ?$the_desc= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);
? ? ?}
? ?} else {
? ? ?$the_desc= HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE;
? ?}

? ?if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
? ? ?if ( HTKA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
? ? ? ?$the_key_words= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;
? ? ?} else {
? ? ? ?$the_key_words= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);
? ? ?}
? ?} else {
? ? ?$the_key_words= HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE;
? ?}

? ?if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
? ? ?if ( HTTA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
? ? ? ?$the_title= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;
? ? ?} else {
? ? ? ?$the_title= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);
? ? ?}
? ?} else {
? ? ?$the_title= HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE;
? ?}
? ?break;

and add the following to english/header_tags.php

// product_reviews_write.php - if left blank in products_description table these values will be used
define('HTTA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HTKA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HTDA_PRODUCT_REVIEWS_WRITE_ON','1');
define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE','');
define('HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE','');
define('HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE','');

I'm sorry for the confusion.

 

Jack

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...