Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags for novices


GemRock

Recommended Posts

Hi Sam

 

Yes, in the next release as I already answered to the same post in the general support thread.

 

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.

Link to comment
Share on other sites

I am not familiar with sts since I havent used any of them myself so I dont know what the difference would be between different types of sts and their versions.

 

At one time I was asked to install my contribution to an osc shop that uses sts, and what I did was a bit like 'reversed-engineering'. as you said in your post that the header tags did not appear on the page source despite the fact that you had added them there. That would suggest the <head> </head> section was somehow bypassed or ignore by sts - exactly the same I saw when I did that installation last time. you would need to look at the application_top.php because that is the only code run before the head section.

 

When I looked at the file, I saw which captures text between application_top.php and header.php. By commenting out that line of code, the header tags showed up. But this may break a few things on the site, which is not difficult to fix - you just need to trace them. I did not made any changes in the general.php RE header tags (my contribution).

 

Sorry I could only give you a hint how to hunt down the problem, not a complete step by step guide as your version of sts may be different.

 

Good Luck,

Ken

 

 

Ken,

 

Next you see a part of the code of a product page. As you can see the <head> </head> is in the html code. Only the code for the meta tags for the key words is not in it. If a put a fixed text in the php code, this fixed text is also in the html code after the line starting with <meta http-equiv.

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="nl">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

<base href="http://www.creatief4all.nl/">

 

<!-- start get_javascript(applicationtop2header) //-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<!-- end get_javascript(applicationtop2header) //-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<style type="text/css">

<!--

.stijl1 {

font-size: 48px;

font-weight: bold;

color: #940045;

}

.stijl2 {color: #940045}

-->

</style>

</head>

Link to comment
Share on other sites

sorry trembia, I dont really know what you meant.

Ken

 

 

 

Ok, I want all products to have only one MY specific description tag and keywords tag.

For example I want to make all products with one description tag: computers

and with keywords: hardware, installation, mouse

and I want that all my products have this keyword tag and descr.tag.

is it possible?

Edited by trembita
Link to comment
Share on other sites

Hi frank

 

sts would not or could not (completely unwise if doing so) replace the whole header section. what it may have replaced in your case is the meta tags. I got a feeling the sts is designed to work with another header tags controbution. if you dont have that contribution installed then you get no header tags. if this is the case you would need to change the sts you are using, basically to disable its capturing of the header info.

 

as for my contribution, as long as you add something similar to the follow:

<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]; ?>">

at theheader section of product_info.php, it will then show up. there is no secret there and is very straightforward. you could try to change this line:
<meta name="description" content="<?php echo $header_tags[desc_tag]; ?>">
to:
<meta name="description" content="<?php echo $header_tags[desc_tag]. 'your testing text'; ?>">
the above code would at least show 'your testing text'. But I guess you wont see it because they are ignored by the sts.

Ken

Edited by GemRock

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.

Link to comment
Share on other sites

  • 2 weeks later...

Hi. Excellent contribution, thanks. Just one query: In what format do I enter the Keywords tag in the Admin section? This may have been answered before but searches brought up nothing.

Regards, Edward

Link to comment
Share on other sites

Hi. Excellent contribution, thanks. Just one query: In what format do I enter the Keywords tag in the Admin section? This may have been answered before but searches brought up nothing.

Regards, Edward

plain text.

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.

Link to comment
Share on other sites

Ken, how can I add a space between desc_tag and my testing text because when I use this <meta name="description" content="<?php echo $header_tags[desc_tag]. 'buy'; ?>">

I get

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

Link to comment
Share on other sites

Hello

 

Here is how:

 

<meta name="description" content="<?php echo $header_tags[desc_tag]. "  " . 'buy'; ?>">

Note that there is a space between the added double quotations. or you simply add a space before the word buy within the single quotes.

Ken

Edited by GemRock

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.

Link to comment
Share on other sites

  • 3 weeks later...

hello all,

 

in the contrib 'header tags for novices':

 

in step three of adding code, it is specified that after this code:

 

// add the products model to the breadcrumb trail

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

$model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

if (tep_db_num_rows($model_query)) {

$model = tep_db_fetch_array($model_query);

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

}

}

 

 

you're to add code after it.. this said, i cannot find the above code in ./includes/application_top.php. i'm running osc v2.2 rc2.

 

i have added the code for the previous two steps which i found right away, i just cannot find the step 3 code. i'm a total noob at this kinda stuff.. but i'm getting better! smile.gif

 

(if needed i can attach a copy of my application_top.php here for you to view.)

 

ron-

Link to comment
Share on other sites

...

 

it is precisely at lines 491 - 499. if you can't see it then download rc2a and extract the file in question and replace your exosting one with it if you have not made any change to it.

 

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.

Link to comment
Share on other sites

it is precisely at lines 491 - 499. if you can't see it then download rc2a and extract the file in question and replace your exosting one with it if you have not made any change to it.

 

Ken

 

ken, thanks for the information.. this contrib works great..

 

this said, i noticed that 'title' displays the name of my store: ronzsmokinwood.

 

can i specify what is to be put for the title? this is what i would like to place in the <title>: "RonzSmokinWood, BBQ, bbq grills, bbq smokers, smoking wood chips, cookshack smokers"

 

 

thanks in advance,

 

ron-

Edited by ronsoto
Link to comment
Share on other sites

ken, thanks for the information.. this contrib works great..

 

this said, i noticed that 'title' displays the name of my store: ronzsmokinwood.

 

can i specify what is to be put for the title? this is what i would like to place in the <title>: "RonzSmokinWood, BBQ, bbq grills, bbq smokers, smoking wood chips, cookshack smokers"

 

 

thanks in advance,

 

ron-

I assume you referred to the product info pages. I recommend you go to admin and use the edit header tags menu/file to enter titles for each product. titles for each product are supposed to be different from each other, or google may complain you got deplicate titles.

 

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.

Link to comment
Share on other sites

I assume you referred to the product info pages. I recommend you go to admin and use the edit header tags menu/file to enter titles for each product. titles for each product are supposed to be different from each other, or google may complain you got deplicate titles.

 

Ken

 

i'm referring to the top blue bar. on the home page it reads: ronzsmokinwood. when going to 'catagories' i'll get ronzsmokinwood-Cookshack Chunks (for that catagory)

 

this said, on the home page i would like to use the 'title' i previously posted. is that possible? i have installed the 'ultimate seo' contrib also.

 

ron-

Link to comment
Share on other sites

i'm referring to the top blue bar. on the home page it reads: ronzsmokinwood. when going to 'catagories' i'll get ronzsmokinwood-Cookshack Chunks (for that catagory)

 

this said, on the home page i would like to use the 'title' i previously posted. is that possible? i have installed the 'ultimate seo' contrib also.

 

ron-

read a few pages back for the answer.

 

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.

Link to comment
Share on other sites

read a few pages back for the answer.

 

Ken

 

hi ken,

 

i found the info on the title. thx. but... if i change the code within 'your' "title" area, am i correct in assuming that 'all' of the pages on my site will display the same 'title'?

 

ron-

Link to comment
Share on other sites

hi ken,

 

i found the info on the title. thx. but... if i change the code within 'your' "title" area, am i correct in assuming that 'all' of the pages on my site will display the same 'title'?

 

ron-

why not test it and find it out then tell me? if not to your liking then change it back and try another trick. it only takes a few minutes I think.

 

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.

Link to comment
Share on other sites

why not test it and find it out then tell me? if not to your liking then change it back and try another trick. it only takes a few minutes I think.

 

Ken

 

i just tested replacing your code for my description. the end result was that all titles are changed to 'what ever' you put between "< >".

 

ron-

Edited by ronsoto
Link to comment
Share on other sites

i just tested replacing your code for my description. the end result was that all titles are changed to 'what ever' you put between "< >".

 

ron-

I am soory I do not understand what is your problem. I think you better post your site url so that I can have a look - a picture is worth more than 1000 words.

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.

Link to comment
Share on other sites

I am soory I do not understand what is your problem. I think you better post your site url so that I can have a look - a picture is worth more than 1000 words.

Ken

 

as i stated in my earlier post, foreach catagory that i have in my store (ie chips, chunks, firestatrers, camp chef....) the title on the top blue bar would be: Ronzsmokinwood - Camp Chef. this is fine.. but on my home page 'ronzsmokinwood.com' the title is 'ronzsmokinwood'. this said i would like to have the home page be a little more descriptive for the googlebot. hence the descriptive title i listed in my previous post.

 

www.ronzsmokinwood.com

 

check on the home page.. the top blue bar will read: ronzsmokinwood

 

check on any other catagory page and the description will change to 'whatever' the catagory is. therefore if your on the Camp Chef base page the title will be: Ronzsmokinwood - Camp Chef.

 

just move around.. you'll see what i mean.

 

ron-

Link to comment
Share on other sites

...

 

ron-

as far as I can see, the home page is fine. you have done it correctly. if you want the landing page of your site - the home page - title to be "RonzSmokinWood, BBQ, bbq grills, bbq smokers, smoking wood chips, cookshack smokers", then you can replace the TITLE (in capital letters) with it, or make the change in english.php (look for the define for TITLE).

 

You have not done any meta tags on the product_info.php though, which is th emost important part of your seo effort.

 

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.

Link to comment
Share on other sites

ken thanks for telling me about the final steps.!

 

i did install the second portion for editing the tags.. and after trying the install i got this error when clicking on the 'edit tags' button in admin | catalog:

 

 

 

The requested URL /myshop/admin/header_tags_edit.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

 

 

 

anyway i thought i set it up right. sigh....... i've rolled back to the original files until i can figure out what's up.

 

ron-

Link to comment
Share on other sites

anyway i thought i set it up right. sigh....... i've rolled back to the original files until i can figure out what's up.

 

ron-

 

i did some poking around and found that i was to copy the header_tags_edit.php from admin/includes. this said i checked and the file is not there..

 

since i'm a noob.. can you tell my where to get the file?

 

thanks,

 

ron-

Link to comment
Share on other sites

anyway i thought i set it up right. sigh....... i've rolled back to the original files until i can figure out what's up.

 

ron-

 

 

i did some poking around and found that i was to copy the header_tags_edit.php from admin/includes. this said i checked and the file is not there..

 

since i'm a noob.. can you tell my where to get the file?

 

thanks,

 

ron-

donload the contribution again. It goes in admin.

Edited by Coopco
Link to comment
Share on other sites

donload the contribution again. It goes in admin.

 

Hi Ken,

 

after installing the edit-header-tags portion i'm getting this error:

 

1054 - Unknown column 'pd.title_tag' in 'field list'

 

select p.products_id, p.manufacturers_id, pd.products_name, pd.title_tag, pd.desc_tag, pd.keywords_tag, p.manufacturers_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' limit 0, 20

 

[TEP STOP]

 

 

darn it... ! i checked the editing it seems that i did the copy/paste correctly.. but obviously i did something wrong.

 

ron-

Link to comment
Share on other sites

Hi Ken,

 

after installing the edit-header-tags portion i'm getting this error:

 

1054 - Unknown column 'pd.title_tag' in 'field list'

 

select p.products_id, p.manufacturers_id, pd.products_name, pd.title_tag, pd.desc_tag, pd.keywords_tag, p.manufacturers_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' limit 0, 20

 

[TEP STOP]

 

 

darn it... ! i checked the editing it seems that i did the copy/paste correctly.. but obviously i did something wrong.

 

ron-

Did you open a product after going to the index page in order for fields to be loaded?

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