Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags for novices


GemRock

Recommended Posts

Hi All

 

Any question should be posted here. Do NOT pm or email me unless you wish to pay.

 

Ken

 

 

Hi Ken,

 

sorry to bother you and I appreciate your help. I have followed your instructions for install and the admin section of this seems to be working fine for me. I have made changes in the index and product info files, but the title for each product pages seems to still display the store name taken from the admin page. I am trying to get each product name to appear in the explorer page. I have been screwing around with this all day and i am going bonkers. I appreciate any help you can provide. site is www.lightningwear.com/store. Thanks again, d

Link to comment
Share on other sites

let me first to try to understand you problem:

 

you only have problem with the title meta tag on the product info page(s). if thats the case then post you Title meta tag. below is what I put in as the title tag for the products_info.php I currently working on:

<title><?php echo $header_tags[title_tag]; ?></title>

That shows the category where the product is in and the product name as the page title.

 

if you only need product name, then comment out this line in application_top.php:

	  if (strlen($categories['categories_name'])>1) $header_tags[title_tag] = $categories['categories_name'] . ' ' . $header_tags[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.

Link to comment
Share on other sites

let me first to try to understand you problem:

 

you only have problem with the title meta tag on the product info page(s). if thats the case then post you Title meta tag. below is what I put in as the title tag for the products_info.php I currently working on:

<title><?php echo $header_tags[title_tag]; ?></title>

That shows the category where the product is in and the product name as the page title.

 

if you only need product name, then comment out this line in application_top.php:

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

 

Ken

 

 

thanks. the problem is i am running off a sts_template file. We have categories which are men, women, youth and accessories. Each category has products, but every single page defaults to the .TITLE. Any time i try to add a different script for the title it still goes to the main TITLE. I tried what you said but still no luck. There are no manufacturers so i dont need that to show, just the product name when it is selected. hope this makes sense and thanks for the help in advance! D

Link to comment
Share on other sites

I am afraid you have been wasting your time (maybe mine as well). as far as I know these templates bypass the <head></head> section so whatever you do there simply would be no effect whatsoever.

read the first several pages of this support thread, there s some people successfully do it with template system. have a look to see if any applies to yours.

 

Good Luck!

 

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 afraid you have been wasting your time (maybe mine as well). as far as I know these templates bypass the <head></head> section so whatever you do there simply would be no effect whatsoever.

read the first several pages of this support thread, there s some people successfully do it with template system. have a look to see if any applies to yours.

 

Good Luck!

 

Ken

 

thanks Ken. sorry to bother you! I appreciate you looking in to this. Would you be for hire if I cant figure it out? D

Link to comment
Share on other sites

its not possible for me to offer further help on this forum w/o looking at the actual template other than to say that the basic idea is to restore the original header section by killing the template's header interference, which will depend on each template.

Good Luck!

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

to those who are using a template (whatever template), what i could say is, there is a will (template) there is a way. i have no interest to find out what the template is or where its from, i am only interested in "reverse engineering" to trace to the very source of the problem and find a solution, which, yes, would be different from template to template as shown in the past and the most recent one.

 

if you like the contribution then dont give up.

 

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

  • 4 weeks later...

hi,

 

thx for this contribution :)

 

i have had no problem for the installation, the title and the description for the home page works but the title, description and keyword for the product_info page did not.

i have try with writing title, descriptions of my products, or try with let them blank (then it would take my default title and description if i have understand) but the both don't work, when i make a search of my products on google, i don't find them. :(

 

can you help me ?

 

thx,

 

NIco

 

ps : sorry, my english is not very good

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

 

i can only help you as much as you can help yourself.

 

1. are you using a template system?

 

2. post here the meta tags code including title tag, description tag and keywords tag you added to product_info.php (do NOT post the entire file).

 

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

thx for your quick response :)

 

i'm not using template and for the code of the product_info, i have tried with the first, and the second code that are given in the installation explanation :

 

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<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]; ?>">

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="<? echo THEMA_STYLE;?>">

 

i have leave the categorie meta tag( in the admin) empty, but if i have understood, it doesn't matter for what i'm looking for.

i have an htaccess on my admin roots, does it make matter ?

 

thx again,

 

NIco

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

this line does suggest you seem to be using a template:

<link rel="stylesheet" type="text/css" href="<? echo THEMA_STYLE;?>">

this contrib is very straightforward and the only reason why it fails to do what it supposes to is the site is using a template (which will require a special, template-depending way of adding the contrib) unless there is something wrong in the installation which does not look like in your case.

Note that the contrib wont make your site appear on google search over-night so do nto serach google for proof of whether it is working ot not. you can look at the page source to tell whether the installation/contrib works the way you would like it to.

 

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'm using the contribution boximagethema that let me use gif picture for my boxes, and this contribution change the stylesheet too, you think it could be the problem ?

there's 2 other difference in my product_info.php between the source code of osc and the code with box image thema

the first one:

 

source code :

<?php
 if ($product_check['total'] < 1) {
?>
  <tr>
	<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>

 

 

with boximagethema:

<?php
 if ($product_check['total'] < 1) {
?>
  <tr>
	<td>
	<?php 
	$info_box_contents = array();
	$info_box_contents[] = array('text' => TEXT_PRODUCT_NOT_FOUND);

	// Nom des css pour l'intérieure de la boxe et le cadre
	// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
	new infoBox($info_box_contents, infoBoxContentsProductInfo, infoBoxProductInfo);
	?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

 

 

the second one:

 

source code:

<?php
if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" summary="" cellspacing="0" cellpadding="2" align="right">
		<tr>
		  <td align="center" class="smallText">
<script type="text/javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '<\/a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
		</tr>
	  </table>
<?php
}
?>
	  <p><?php echo ereg_replace('& ', '& ', stripslashes($product_info['products_description'])); ?></p> <!-- W3C -->
<?php

 

 

with boximagethema:

<?php
if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
		<tr>
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
		</tr>
	  </table>
<?php
}
?>
	  <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php

 

do you think the problem could be here ???

 

i'm not good in php, and i'm affraid i will not be able to adapt the code.

do you think i will have the same problem if i install another version of header tag ?

i really need this solution because i sell a lot of different product (rare vynil records) and this would be perfect for me, i have no money for publicity.

for the search on google, i have open my website on monday of this week, how many time after does it works usually ?(i have guess it would be quick to be on "google" but my knowledge on these are limited) :blush:

 

big thx again, your help is very appreciated :)

 

have a nice week-end ;)

 

NIco

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

I dont know those you installed slthou they sound rathher useless to me. to determine whether your header section has been bypassed (like many template systems do), change this

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

to:

<title><?php echo "not a template if you see this at top of the browser"; ?>

for a new site it would take up to 6 months to get google to index your site, ie, make it searchable. but you are right to start the basic seo work from the very beginning. and dont forget a good google sitemap and googlebase data feed both of which would need to be usibg the same style of urls.

 

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

this should read

<title><?php echo "not a template if you see this at top of the browser"; ?></title>

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

thx for these advices Ken, i'll try it, :)

 

greetz,

 

NIco

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

sorry for the double post

 

 

 

thx for these advices Ken, i'll try it, :)

 

greetz,

 

NIco

 

edit : i see "not a template if you see this ..." on the index at the top of ma page, that confirm what i was thinking, boximagethema i use is not recognized as a template.

and with the :

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

 

i see the name of product and the name of the categorie on the index at the top of the page.

 

what i don't understand is that my website name is "breizh-tekshop" when i write "tekshop" on google, i'm ranking on the first page. but if i write my website name + a product name, google gives no response, but if i write my website name + a manufacturer name, i have a response (but from my listing in my manufacturers boxe).

All that would means, that google have index my website but not the product_info pages. <_<

now i'm gonna try a sitemap, and google base data feed. after install that, no reason why the contribution don't work with my product_info ...

 

 

tchuss ;)

Edited by mouth56

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

hi,

 

ok, my products begin to be on google, day after day (i was not enough patient)

 

thx again for this contribution :)

version : oscommerce-2.2rc1-FR-w3c-3

 

 

contributions : boximagethema, osplayer, featured_product, product extra field, search price range pulldown, loginbox, MATC, More Pics 6, discount coupon code 3.32, Salemaker, Anti Robot Registration Validation, Ban IP Addresses v2.0, visitor web stats 3.2, Optimize_tep_get_tax_ratev1.1, seo header tags v5, Modul_lettre 1.1, master password, short description v2.2, Product Name in navigation bar 1.00, Mini Images v2.0, googlemap, atos 2.7.1 .

Link to comment
Share on other sites

  • 2 weeks later...

Please help insert this method into Article manager

this contribution currently only focuses on the home page, categories and products which are the most important and common parts of an online store. it does not support directly the article manager although it can be added quite easily if necessary and your sites articles are important to you. but i dont have the time at the moment.

the articles.php is very much like the index.php so you could try to add keywrods/description tags to it in a way similar to the index.php. the article_info.php is like the product_info.php. i think for you the code for checking if there is article or not is of no use and could be deleted. then the $article_info_query could be moved up to the top so as to make the author, article name and content available for both the meta tags contribution and the article itself.

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

  • 2 months later...

Hello,

 

I have this contribution installed and running fine, thanks for the hard work! My issue is as follows:

 

I display out of stock products, but the <title> tag will only display TITLE not (strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' - ' . $breadcrumb_tags->trail_tags(' ') . ' - ' . TITLE

 

Has anyone had any luck with getting this working properly?

 

Thanks

Link to comment
Share on other sites

hello johanv

 

i dont think the meta tags would have anything to do with stock level. as a test, i set the stock level/quantity to zero for Logitech IntelliMouse Pro on my demo site and it shows the meta tag as usual. append osc22rc2a to my 'home' page to see it yourself.

 

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

hello johanv

 

i dont think the meta tags would have anything to do with stock level. as a test, i set the stock level/quantity to zero for Logitech IntelliMouse Pro on my demo site and it shows the meta tag as usual. append osc22rc2a to my 'home' page to see it yourself.

 

Ken

 

Thank you for the response Ken. I am actually changing the product status from 'In Stock' to 'Out of Stock' as well as a quantity of zero. I suppose they cancel each other out in a way, so I can keep the product active yet keep the quantity at zero. That should do the trick.

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Hello!!

 

First of all this is a Great contribution!! Thanks

 

it works beautifuly except two problems..

 

1.Manufacturers title not displaying.

 

2.Title for categories not displaying but desc and keywords, which i enter from admin panel.

 

My code for product_info.php is

 

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

 

Regards

Jaskaran

Link to comment
Share on other sites

Hi,

 

Good contribution for someone like me who doesn't have a good knowledge of SEO. everything went smoothly in the installationo

 

I just wanted to ask that how do I check if this contribution is working properly. Because I checked my site's meta tags on following site:

meta tag anaylser

 

And It is showing the same meta tags as the home page ones not different ones for the different product pages.

 

Can you please tell me how to check if I have installed it correctly. I am using STS template.

 

by the way my website is [the cheap laptops [dot] co [dot] uk ]

 

Thank you

Link to comment
Share on other sites

Hi,

 

Good contribution for someone like me who doesn't have a good knowledge of SEO. everything went smoothly in the installationo

 

I just wanted to ask that how do I check if this contribution is working properly. Because I checked my site's meta tags on following site:

meta tag anaylser

 

And It is showing the same meta tags as the home page ones not different ones for the different product pages.

 

Can you please tell me how to check if I have installed it correctly. I am using STS template.

 

by the way my website is [the cheap laptops [dot] co [dot] uk ]

 

Thank you

 

This sorted now I am using header tags SEO (HTS) and sitemap seo and the problem seems to be solved.

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