Jump to content
Sign in to follow this  
GemRock

Header Tags for novices

Recommended Posts

Just thought I would post an update. First of all, great contribution!

 

I modified it because in my case I want the product page to show the title tag I input in the system. When I did that by default the product page was showing the category name and then the title tag I input in the administration.

 

So what I did is basically commented out 2 lines from the application_top.php

if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . ' ' . $header_tags[title_tag];
if (strlen($manufacturers['manufacturers_name'])>1) $header_tags[title_tag] .= ' ' . $manufacturers['manufacturers_name'] . ' ' . $header_tags[title_tag];

 

You want to comment those out. My reason is that some of the products will appear in multiple categories and I want total control over Title tag.

 

Again, thanks for the great contribution!

Share this post


Link to post
Share on other sites

Just wanted to give you another heads up. I successfully hacked this contribution to add h1, h2 and h3 tags. Now I can control those from the admin panel and it appears on the product info and category pages.

 

Thanks once again for the great contribution!

Share this post


Link to post
Share on other sites

pls make sure the test site actually works. a quick look found that the configure.php files refer to another site. i dont have much time so you'd test it (the url etc) before handing it to me. i am not suppose to fix other issues eg the configure.php and db connection.

 

Ken

 

I apologize I forgot to configure configue.php. It is Ok now.

But it's a different site, I just copied the files because I can't give access for this website.

I tried to reinstall Os Commerce but it does not work.

I have an error message if I go www.akylon.com/catalog

 

I do not know if you have what it takes to watch, I do not think so.

Share this post


Link to post
Share on other sites

I apologize I forgot to configure configue.php. It is Ok now.

But it's a different site, I just copied the files because I can't give access for this website.

I tried to reinstall Os Commerce but it does not work.

I have an error message if I go www.akylon.com/catalog

 

I do not know if you have what it takes to watch, I do not think so.

 

I forgot to tell you that I also copied the sql from the old site, I do not know if it needed.

 

I'm sorry I do not speak English well, so sometimes I do not understand everything.

Share this post


Link to post
Share on other sites

I forgot to tell you that I also copied the sql from the old site, I do not know if it needed.

 

I'm sorry I do not speak English well, so sometimes I do not understand everything.

basically, you need to make sure the test site works, eg, theres at least one category and one product (more would be good) but thats not the case when i checked it a couple of hrs ago.

any way, you could try spoof's suggestion and mod (in the application_top.php) to see if that solves your rpoblem.

 

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.

Share this post


Link to post
Share on other sites

basically, you need to make sure the test site works, eg, theres at least one category and one product (more would be good) but thats not the case when i checked it a couple of hrs ago.

any way, you could try spoof's suggestion and mod (in the application_top.php) to see if that solves your rpoblem.

 

Ken

 

I do not know how to reinstall the shop correctly.

I'm going to find the problem alone, I will check carefully.

If I find, I tell you.

 

Thank you for your help

Share this post


Link to post
Share on other sites

I do not know how to reinstall the shop correctly.

I'm going to find the problem alone, I will check carefully.

If I find, I tell you.

 

Thank you for your help

 

I checked everything and I do again but still the same problem.

Is it possible to remove at least the name of the category in the title? and so Ihave only what I enter in the admin for the title even if repeats.

Share this post


Link to post
Share on other sites

Hi,

 

I changed the code in application_top.php file.

I deleted the lines: (around line 542)

     if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . ' ' . $header_tags[title_tag];
     if (strlen($manufacturers['manufacturers_name'])>1) $header_tags[title_tag] .= ' ' . $manufacturers['manufacturers_name'] . ' ' . $header_tags[title_tag];

 

And it works for the title, the title is not repeated, it's ok !

 

This does not work for the category but it doesn't matter.

Share this post


Link to post
Share on other sites

I have installed the files woked great thank you!

 

I do have 1 question after I run my googlebase.php I find this with every item

 

Breakaway 98 Nintendo 64 N64 8bitjunkies.com used video games and systems. Atari Sega Nintendo Playstation Xbox Intellivision Used game cart only great condition Great fun even better price! 2010-05-11 5.00 http://www.8bitjunkies.com/images/nhl.jpg Nintendo, Nintendo 64, Games 121 0.00 Gms. Paypal,Visa,MasterCard,WireTransfer Games USD Your Store, Inc. NH USA ::0:n 1 New 20-90 USA

 

 

This is the line in question "Paypal,Visa,MasterCard,WireTransfer Games USD Your Store, Inc. NH USA ::0:n 1 New 20-90 USA" I think there are just default key words. where do I edit this info?

 

Thank you inadvance for any help

Share this post


Link to post
Share on other sites

i dont know. but if you browse each product url and it doesn't show the unwanted "keywords" in the meta tags, then the problem is with the googlebase.php. one way to find out is to look at your google sitemaps (try a few product urls) as it doesn't add any extra to the meta tags.

 

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.

Share this post


Link to post
Share on other sites

Hi There, I went thru the instructions twice but I don't think it's working.

I the admin module, I added some text to product meta tags and category meta tags.

The URL looks as it did before (for example .../product_info.php?cPath=10&products_id=104).

Any ideas? Thanks!

Share this post


Link to post
Share on other sites

Hi There, I went thru the instructions twice but I don't think it's working.

I the admin module, I added some text to product meta tags and category meta tags.

The URL looks as it did before (for example .../product_info.php?cPath=10&products_id=104).

Any ideas? Thanks!

this contribution does NOT change urls. if you also want to change urls, you should install ultimate seo urls by chemo updated by Jack, in addition to this contribution.

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.

Share this post


Link to post
Share on other sites

Would it work to change this around in application_top?

 

//add category name to page title

if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . $header_tags[title_tag];

 

to this

 

//add category name to page title

if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $header_tags[title_tag] . $categories['categories_name'];

 

 

This changes product first and then category

 

 

I am not certain if this would be the only change necessary, or if other things also needs changing... it appears to work in that it puts product first and category second. SEO experts say to place the most relevant keywords at the front. My most relevant keywords are the product and then the category.

Edited by Debs

Share this post


Link to post
Share on other sites

its entirely up to you to decide what is more important. if you are selling unique products then product name may be important, otherwise visitor may be searching for more general keywords, ie, category names. i dont believe the so called seo expert, there is only seo common sense. or if you have money you can surely bribe google to get notice and in this case you are the expert otherwise whatever you do would get google notice is everyone' guess. in googles eye money is not evil as it declares it does not do evil.

 

Ken

ps. the contribution has some changes ever since along with the late chemo USURL but havent got the time to put them together and make it available.

 

Would it work to change this around in application_top?

 

//add category name to page title

if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . $header_tags[title_tag];

 

to this

 

//add category name to page title

if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $header_tags[title_tag] . $categories['categories_name'];

 

 

This changes product first and then category

 

 

I am not certain if this would be the only change necessary, or if other things also needs changing... it appears to work in that it puts product first and category second. SEO experts say to place the most relevant keywords at the front. My most relevant keywords are the product and then the category.


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.

Share this post


Link to post
Share on other sites

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 ?

 

Thanks and regards

M@rio

Share this post


Link to post
Share on other sites

Hi,

 

I have been using this for months now and its a great contribution. Thank you for the effort that has gone into this!

 

I am having one issue, and let me explain what I have done.

 

I have removed all references to product stock in both Product Info and Application Top, so that out of stock items will display. The problem is that my Title is not being displayed for the products that are out of stock. The in stock items have the title no problem. The description and keyword tags are working fine.

 

Anyone else tried this with success? If more details are required please let me know.

 

Johan

Share this post


Link to post
Share on other sites

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 ?

 

Thanks and regards

M@rio

 

nothing, apart from according to the instructions.

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.

Share this post


Link to post
Share on other sites

Hi,

 

I have been using this for months now and its a great contribution. Thank you for the effort that has gone into this!

 

I am having one issue, and let me explain what I have done.

 

I have removed all references to product stock in both Product Info and Application Top, so that out of stock items will display. The problem is that my Title is not being displayed for the products that are out of stock. The in stock items have the title no problem. The description and keyword tags are working fine.

 

Anyone else tried this with success? If more details are required please let me know.

 

Johan

logically (and normally), stock level has nothing to do with the title tag, unless you have done some extraordinary (but wrongly or unnecessary) changes to your site. if you want to show out of stock products you would only need to set check stock level to false in admin rather than being keen to show you are capable to spend time changing code in the two files of application top and product info.

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.

Share this post


Link to post
Share on other sites

hi there,

 

i use the contribution with great success and i have to say that i am impressed with it.

 

I have a small silly problem that i can't find the solution.....

 

when i am in categories pages (no products) there should be a dash (-) between the product title and shop title on the top of the browser title

 

Unfortunately there is no such dash (as there is on products.info page)

 

From where do i add the (-) sign to have it between title and shop title in the categories pages?

 

thanks in advance

Share this post


Link to post
Share on other sites

Hello!!

 

How come the "page Title tag" becomes the product name...

 

The two meta tags below

<meta name="description" content="">

<meta name="keywords" content="">

 

come up without trouble.. i tried saving and re-saving but it still coming up with the product name, category name and OsCommerce..

 

 

Gaah.. help

Share this post


Link to post
Share on other sites

add a dash before the title in the title tag.

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.

Share this post


Link to post
Share on other sites

under what condition the "page Title tag" becomes the product name? answers could only be good if the question is as detailed as possible.

 

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.

Share this post


Link to post
Share on other sites

STS Use for the change as shown below. The problem is not paddle?

 

catalog/includes/modules/sts_inc/general.php

 

//$sts->template['headertags']= "<title>" . TITLE ."</title>";

 

if (isset($cPath) && tep_not_null($cPath)) {

// Header Tags for novices w/STS v4.3.3 BOF

$sts->template['headertags']= "<title>";

$sts->template['headertags'] .= (strlen($breadcrumb_tags->trail_tags('')) > 0) ? TITLE . ' - ' . $breadcrumb_tags->trail_tags(' - ') . ' - ' . $cat_tags[title_tag] : TITLE;

$sts->template['headertags'] .= "</title>\n";

$sts->template['headertags'] .= "<meta name=\"description\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($cat_tags[desc_tag]);

$sts->template['headertags'] .= "\">\n<meta name=\"keywords\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($cat_tags[keywords_tag]);

$sts->template['headertags'] .= "\">\n";

 

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

$sts->template['headertags']= "<title>";

$sts->template['headertags'] .= (strlen($breadcrumb_tags->trail_tags('')) > 0) ? TITLE . ' - ' . $breadcrumb_tags->trail_tags(' - ') . ' - ' . $header_tags[title_tag] : TITLE;

$sts->template['headertags'] .= "</title>\n";

$sts->template['headertags'] .= "<meta name=\"description\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($header_tags[desc_tag]);

$sts->template['headertags'] .= "\">\n<meta name=\"keywords\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($header_tags[keywords_tag]);

$sts->template['headertags'] .= "\">\n";

// Header Tags for novices EOF

} else {

//set default

//default keywords for the index (home) page

$kws_home_default .= STORE_NAME;

//default Description for the index (home) page in your laguages

$desc_home_default = TEXT_DEFAULT_DESCRIPTION_TAG;

 

$sts->template['headertags']= "<title>";

$sts->template['headertags'] .= TITLE . ' - ' . TEXT_ADD_DEFAULT_TITLE;

$sts->template['headertags'] .= "</title>\n";

$sts->template['headertags'] .= "<meta name=\"description\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($desc_home_default);

$sts->template['headertags'] .= "\">\n<meta name=\"keywords\" content=\"";

$sts->template['headertags'] .= htmlspecialchars($kws_home_default);

$sts->template['headertags'] .= "\">\n";

}

// Header Tags for novices EOF

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
Sign in to follow this  

×