Jump to content



Photo
* * * * - 4 votes

Header Tags for novices


  • Please log in to reply
782 replies to this topic

#761   GemRock

GemRock
  • Members
  • 2,074 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 16 February 2011 - 11:24

the only possible reason for no-show of the manu. list could be the language id. try to change this line 204:
$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, title_tag, desc_tag,  keywords_tag from " . TABLE_MANUFACTURERS . " where language_id = '$languages_id' " . " $sort_by ";

to

$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, title_tag, desc_tag,  keywords_tag from " . TABLE_MANUFACTURERS .  " $sort_by ";

assuming you only have one language. you can look at the table to see if there is any language id. if there is, then somehow the variable $language_id is empty.
Ken
commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#762   Truus100

Truus100
  • Members
  • 5 posts
  • Real Name:Paulien
  • Gender:Female

Posted 16 February 2011 - 14:48

The language id was problem. Somehow all the manufacturers had the wrong (default) language id. I changed that in the database and everything works fine. Great! I'm very happy (hope google will be as happy as i am). You have been very helpful, thanks a lot!!!

Paulien

#763   iffy

iffy
  • Members
  • 6 posts
  • Real Name:Iffy
  • Gender:Female
  • Location:United States - New Jersey

Posted 17 May 2011 - 02:30

Hi Ken,

Thanks for an awesome contribution! It works great, but I have one hopefully minor problem. My Product_Info page doesn't display manufacturer, which I would really like to include. Not sure what the issue may be. I'm using the following title tag on my product_info.php:

title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' - ' . $breadcrumb_tags->trail_tags(' ') . ' - ' . TITLE : TITLE; ?>
</title>

Thanks for your help.
Best,
Iffy

#764   GemRock

GemRock
  • Members
  • 2,074 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 18 May 2011 - 15:29

read the previous page (page 38) post #755 onward, to see if that help?
Ken

Hi Ken,

Thanks for an awesome contribution! It works great, but I have one hopefully minor problem. My Product_Info page doesn't display manufacturer, which I would really like to include. Not sure what the issue may be. I'm using the following title tag on my product_info.php:

title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' - ' . $breadcrumb_tags->trail_tags(' ') . ' - ' . TITLE : TITLE; ?>
</title>

Thanks for your help.
Best,
Iffy


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#765   iffy

iffy
  • Members
  • 6 posts
  • Real Name:Iffy
  • Gender:Female
  • Location:United States - New Jersey

Posted 20 May 2011 - 03:56

Hi Ken,

Adding the manufacturers tag to the index.php page definitely helped. Sorry for this basic question, but I think I am misunderstanding you. Are you suggesting that the same code that was added to the index.php page should also be added to the product_info.php page?

Thanks,
Iffy

#766   GemRock

GemRock
  • Members
  • 2,074 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 20 May 2011 - 14:52

what i can do is to offer a quick fix as i know little about your website.

in product_info.php, below
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
add:
$mID_sql = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'");
	$mID_query = tep_db_fetch_array($mID_sql);
	$mID = $mID_query['manufacturers_id'];

	$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$mID . "'");
	
	$manufacturers = tep_db_fetch_array($manufacturers_query);
	$m_name = $manufacturers['manufacturers_name'];
now, you get the manufacturers name, you can add it to wherever you want to. eg, add it to the title tag:

<title><?php echo $header_tags[title_tag] . ' - '.$m_name. ' - '. TITLE; ?></title>


Ken

Hi Ken,

Adding the manufacturers tag to the index.php page definitely helped. Sorry for this basic question, but I think I am misunderstanding you. Are you suggesting that the same code that was added to the index.php page should also be added to the product_info.php page?

Thanks,
Iffy


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#767   iffy

iffy
  • Members
  • 6 posts
  • Real Name:Iffy
  • Gender:Female
  • Location:United States - New Jersey

Posted 28 May 2011 - 12:57

Hi Ken,

Thanks for all you help. It worked perfectly! If you would like to take a look, my site is at:

www.cuddlebugfactory.com

I'm very happy with the way it's turning out...thanks to you and all of the other contributors on this forum.

Best regards,
Iffy

Edited by Jan Zonjee, 15 January 2012 - 22:01.


#768   jack32

jack32
  • Members
  • 9 posts
  • Real Name:Justin Phillips

Posted 15 January 2012 - 17:28

Hi.
I could follow all steps except these ones in index.php and products_info.php.
Couldn't find
<title><?php echo TITLE; ?></title>
in there.
What can I do ?

#769   Darren11

Darren11
  • Members
  • 32 posts
  • Real Name:Darren

Posted 29 January 2012 - 21:31

I installed seo header tags version 5.00 with Ultimate Seo Urls 5 PRO and they both work grate together and header tags for novices is a lot more easy to install and set up then KissMT by far. I hope people continue to support it.

Thank you for this great contribution.

Darren

#770   Pelvis

Pelvis
  • Members
  • 14 posts
  • Real Name:Nikolaos

Posted 18 March 2012 - 23:25

(sorry for my very bad English)
Ken Thanks for that Great Work
So the Contrib is working great in osc 2.2
Today i installed it on new osc 2.31
All steps was same except 2 changes
1. Change
-----------------------------
in admin/includes/boxes/catalog.php
I wrote
array(
'code' => FILENAME_HEADER_TAGS_CATEGORY_EDIT,
'title' => BOX_CATALOG_HEADER_TAGS_CATEGORY_EDIT,
'link' => tep_href_link(FILENAME_HEADER_TAGS_CATEGORY_EDIT)
),
array(
'code' => FILENAME_HEADER_TAGS_EDIT,
'title' => BOX_CATALOG_HEADER_TAGS_EDIT,
'link' => tep_href_link(FILENAME_HEADER_TAGS_EDIT)
),
----------------------
2. Change
In osc 2.31 at index.php & product_info.php
there is no title tag: but there is a link to a file called template_top.php
and the title tag is in there so i give the code for the index.php there.
The problem is that at product_info.php there is the same link to the same template_top.php file
but in the instructions
the code for the title tag in product_info.php are Different than the title tag in index.php
So i made a new file (copy from template_top.php) renamed it template_top_products.php
and put the code for the Products title tag there and renamed the link from product_info.php to
template_top_products.php where the Products title tag is present.
Of course you can only understand that if you have installed osc2.31 did you?
Or has somebody else installed this great Contrib in osc2.31
Thanks friends

Edited by Pelvis, 18 March 2012 - 23:28.


#771   Pelvis

Pelvis
  • Members
  • 14 posts
  • Real Name:Nikolaos

Posted 25 March 2012 - 00:48

And a Last question
What is the corect code for catalog/product_info.php

This:
-------------------------
<title><?php echo $header_tags[products_name]; ?></title>
-------------------------
Or This (from the last Install Instructions):
-------------------------
<title><?php echo $header_tags[title_tag]; ?></title>
<meta name="description" content="<?php echo $header_tags[desc_tag]; ?>">
<meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">
--------------------------
Thanks for your time!

#772   toyicebear

toyicebear
  • Community Sponsor
  • 6,409 posts
  • Real Name:Nick
  • Gender:Male
  • Location:World Citizen

Posted 25 March 2012 - 03:31

In 2.3.1 you do not edit individual files for adding in meta/title info, its all done in just one file: includes/template_top.php

#773   Orpian

Orpian
  • Members
  • 6 posts
  • Real Name:Jonas

Posted 06 June 2012 - 14:12

Hello,

I've just installed this contribution, but unfortunatly I just still don't get any meta tags & discription in my header tags..
I've tried for so long now (with many other contributions as wel), i just don't know what's wrong, could this be maybe because i'm using an STS template?
I really don't now, it's just very frustrating my webshop is unfindable in google..

This is a link to my shop: http://bordspel.goed-kopen.be

Here is a link to the index.php file: http://goed-kopen.be/upload/index.rar (or see the attached file)

I really really hope somebody could help me with this problem, i just want some meta keywords and a discription on the index page so that google can find us!
Thank you very much!

Sincerely,
Jonas

Attached Files


Edited by Orpian, 06 June 2012 - 14:13.


#774   DunWeb

DunWeb

    The Censored One

  • Members
  • 13,084 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 06 June 2012 - 14:22

@Orpian

I am sure it as something to do with the STS contribution. If you check the STS support thread I do believe it mentions Header tags SEO issues.

Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#775   Orpian

Orpian
  • Members
  • 6 posts
  • Real Name:Jonas

Posted 06 June 2012 - 15:11

Pfuh, i finally got it. Needed to change the template index instead of the usual catalog/index.php!

#776   GemRock

GemRock
  • Members
  • 2,074 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 06 June 2012 - 15:42

i think i have missed afew posts (no email notification sent to me).

for osc 2.3.1, you add this code to template__top.php between
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
and the 'base href' bit. changes to the application_top.php is the same as in osc 2.2. the results can be seen in my demo osc231 shop (accessed from my profile).
<?php
if (stristr($_SERVER['PHP_SELF'],'index.php')) {
?>
<title><?php echo (strlen($title_tag) > 1) ? $title_tag . ' - ' . TITLE : $title_home_default . ' - ' . TITLE; ?></title>
<meta name="description" content="<?php echo (strlen(strip_tags($desc_tag)) < 5)? $desc_home_default : strip_tags($desc_tag); ?>">
<meta name="keywords" content="<?php echo (strlen(strip_tags($keywords_tag)) < 5) ? $kws_home_default : strip_tags($keywords_tag); ?>">
<?php
}else if(stristr($_SERVER['PHP_SELF'],'product_info.php')){
?>
<title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' -' . $breadcrumb_tags->trail_tags(' ') . ' ' . TITLE : TITLE; ?>
</title>
<meta name="description" content="<?php echo $header_tags['desc_tag']; ?>">
<meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">
<link rel="canonical" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id='. (int)$HTTP_GET_VARS['products_id']); ?>" />
<?php
}else{
?>
<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
<?php
}
?>

for websites using sts, refer to the above.

Ken

Edited by GemRock, 06 June 2012 - 15:42.

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#777   GemRock

GemRock
  • Members
  • 2,074 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 06 June 2012 - 16:05

for the admin side of osc2.3.1, just comment out the column_left so that it looks like this:
<!-- left_navigation //-->
<?php // require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
in the two files: header_tags_edit.php and header_tags_category_edit.php

Ken
commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#778   marcusmay

marcusmay
  • Members
  • 1 posts
  • Real Name:Markus

Posted 17 June 2012 - 20:06

Hi, Ken

Many thanks for excellent contrib.
Installation on OSC 2.3.1 and runs well

How can I remove shop name from the title tag, even from the category title tag?

greeting

Marcus

#779   Diegosa

Diegosa
  • Members
  • 23 posts
  • Real Name:Diego

Posted 07 September 2012 - 04:04

Hello, I wanted to know if this contribution is compatible with OSC 2.3.3?
Someone already tested it on this version?

regards

#780   rafsan

rafsan
  • Members
  • 2 posts
  • Real Name:Rafa Santamaria

Posted 29 October 2012 - 17:54

Hello, i've installed contribution in oscommerce 2.3.1, and make modification in template_top.php. This don't work for me.
The code i get in my web page is:
<html dir="LTR" lang="es"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> - Solotextilhogar</title>
<meta name="description" content="">
<meta name="keywords" content="">
<base href="http://www.solotextilhogar.com/" />

There is the meta tag description and keywords, but there isn't any description or keywords.

¿can someone help me?

¿can somebody write this wonderful contribution for oscommerce 2.3.1?

Thans to everybody