Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags for novices


GemRock

Recommended Posts

may be is miss understanding when I go to catalog/Edit Header Tags see the picture below

 

miss.jpg

 

 

Display Products per page is blank

 

when click on it and then from the drop down menu chose any number like 10,20,30, ....300

 

it still stay on the same page 4 per page

 

and also when I hit next on the bottom it still stay on the same page where was

 

please help everything in my site map shows home page title is total mess

 

 

 

 

I am sorry but what makes you think this problem is related to my contribution?

 

there is a setting in admin - configuration, which controls how many products you want to show per page, unless your site has been modified or has a problem in it, in which case no one could help you without looking into the settings/files.

 

Ken

Link to comment
Share on other sites

1. Display Products per page dropdown box appears blank: your store's maximum display search results is set to a number which is either lower than 10 or bigger than 300;

suggested solution: find this line (about line 30) in header_tags_edit.php

$row_by_page = MAX_DISPLAY_SEARCH_RESULTS;

and change it to:

$row_by_page = 250;

as it seems you only have about 210 products so a number of 250 will show all your products on one page;

 

2. for any other issues RE Header Tags Entry/Edit that mentioned in your posts, i guess your store may have a problem with its setup.

 

3. Header Tags Entry/Edit is an option and you dont have to use it. that way, it wont have any effect on your home page's page Title.

 

Good luck!

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

is not only possible, its easy as well.

<?php if (isset($cPath) && tep_not_null($cPath)) { ?>
<meta name="description" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">
<?php } else {
<meta name="description" content="your default desc for home page">
  <meta name="keywords" content="your defualt keywords for home page">
<?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.

Link to comment
Share on other sites

is not only possible, its easy as well.
<?php if (isset($cPath) && tep_not_null($cPath)) { ?>
<meta name="description" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">
<?php } else {
<meta name="description" content="your default desc for home page">
  <meta name="keywords" content="your defualt keywords for home page">
<?php } ?>

Ken

 

many thanks Ken, but after an php error i just made this changes

  <?php if (isset($cPath) && tep_not_null($cPath)) { ?>
<meta name="description" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">
<?php } else {
echo  '<meta name="description" content="your default desc for home page">
  <meta name="keywords" content="your defualt keywords for home page">';
} ?>

Link to comment
Share on other sites

Sorry, I typed all that bit on this forum in a hurry and it is difficult to spot an error on a non php editor. it'd have been like this:

<?php if (isset($cPath) && tep_not_null($cPath)) { ?>
<meta name="description" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">
<?php } else { ?>
<meta name="description" content="your default desc for home page">
  <meta name="keywords" content="your defualt keywords for home page">
<?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.

Link to comment
Share on other sites

Ken

 

Thanks for this contribution. After trying for days to get a contribution to work correctly yours seems to be the only one and its brilliant.

 

One problem though. When I use the edit header tags in the admin section the descriptions that i put in don't go to the item page of the product. Its so annoying so near and yet so far.

 

If you could help it would be much appreciated.

Link to comment
Share on other sites

This should not happen unless you are using some sort of template, otherwise post your meta tags of the product info 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.

Link to comment
Share on other sites

Not using any template

 

 

<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['products_name'] . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">

<meta name="keywords" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

 

 

Thats the code from product info. php. Is this the bit that you wanted?

 

 

 

Cheers

Link to comment
Share on other sites

I see. sorry there may have been some mistakes in the instructions. the two meta tags should read:

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

 

Ken

 

edit: deleted -- too late or rather too early here in UK - 1:30 am, mind is not working well?

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

for title tag:

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

or

<title><?php echo $header_tags[title_tag]; ?></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

Hello

 

based on your not so informative post, what i can say is: the answer in in the installation instructions (if read & follow carefully) and/or this support thread - even on this same page.

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

Hi Ken

 

Great Contribution, as I’am a novice and not a good one at that I can say that I installed this in less than 10 mins and thus so far most of it seems to work sweet.

 

The only problem I seem to have if you wouldn’t mind pointing me in the right direction please, is to the separation between the categories name and the item description when I view the source in an actual product page.

 

For some reason it doesnt seem to be putting a comma and space between the two “Oval Turn Only (Each)Locks,”

 

Strange as every other page above this works fine categories and sub categories

 

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

<title>Oval Turn Only (Each) - Locks, Latches & Security Latches & Bathroom Locks - Pickard Hardware</title>

<meta name="description" content="Oval Turn Only (Each)Locks, Latches & Security Latches & Bathroom Locks">

<meta name="keywords" content="Oval Turn Only (Each)Locks, Latches & Security, Latches & Bathroom Locks">

 

Many thanks once again

Link to comment
Share on other sites

Hi Mike

 

Could you post the actual code you use for the 3 meta tags in product info php as mentioned in your post and quoted below.

 

Ken

...<title>Oval Turn Only (Each) - Locks, Latches & Security Latches & Bathroom Locks - Pickard Hardware</title>

<meta name="description" content="Oval Turn Only (Each)Locks, Latches & Security Latches & Bathroom Locks">

<meta name="keywords" content="Oval Turn Only (Each)Locks, Latches & Security, Latches & Bathroom Locks">...

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

Hi Mike

 

Could you post the actual code you use for the 3 meta tags in product info php as mentioned in your post and quoted below.

 

Ken

 

Hi Ken

 

Thnak you very much for helping out here is the code.."hope i got the right one..lol"

 

<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['products_name'] . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">

<meta name="keywords" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

Link to comment
Share on other sites

you can add a space or a hyphen between the product name and the other part of the description or keyworks easily just like the way the title tag does:

<meta name="description" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

replace it with:

<meta name="description" content="<?php echo $header_tags['products_name'] . ' - ' . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo $header_tags['products_name'] . ' - ' . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

This will insert a hyphen between the two parts. or you can take off the hyphen and use space instead whichever way you see fit.

 

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 have just installed this contrib and in admin the heading in the box shows as BOX_CATALOG_HEADER_TAGS_EDIT

 

Here is the code for that line

 

'<a href="' . tep_href_link(FILENAME_HEADER_TAGS_EDIT, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_HEADER_TAGS_EDIT . '</a><br>' .

 

Can't think for the life of me how to sort this.

 

Nick

Link to comment
Share on other sites

it should only take you one minute (far from your whole life) to sort this out if you read the instructions another time with a bit more care perhaps :) : you forgot to upload one language file to the server or you uploaded it to the wrong place.

 

Good Night & 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

you can add a space or a hyphen between the product name and the other part of the description or keyworks easily just like the way the title tag does:
<meta name="description" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo $header_tags['products_name'] . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

replace it with:

<meta name="description" content="<?php echo $header_tags['products_name'] . ' - ' . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">
<meta name="keywords" content="<?php echo $header_tags['products_name'] . ' - ' . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

This will insert a hyphen between the two parts. or you can take off the hyphen and use space instead whichever way you see fit.

 

Ken

 

 

HI Ken sorry to bother you again, but iam still having a little problem if you could point me in the right direction i would be very greatfull. i replaced the code and i thought it had worked but on some produts it still seems not to put a "," between the product name and the rest of the breadcrum??

 

code iam using

 

<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) ? $breadcrumb_tags->trail_tags(' ') . ' - ' . TITLE : TITLE; ?></title>

<meta name="description" content="<?php echo $header_tags['products_name'] . ' ' . strip_tags($breadcrumb_tags->trail_tags(' ')); ?>">

<meta name="keywords" content="<?php echo $header_tags['products_name'] . ', ' . strip_tags($breadcrumb_tags->trail_tags(', ')); ?>">

 

 

Actual sorce

 

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

<title>Direct Insulated 1050x300mm - Tanks & Cylinders Copper Cylinders Direct Cylinders - LPS Supplies</title>

<meta name="description" content="Direct Insulated 1050x300mmTanks & Cylinders Copper Cylinders Direct Cylinders">

<meta name="keywords" content="Direct Insulated 1050x300mmTanks & Cylinders, Copper Cylinders, Direct Cylinders">

 

 

page its from

 

http://lpssupplies.com/direct-insulated-10...0mm-p-2601.html

 

Iam just trying to get a space in the description and a "," in the keywords like the rest of it seems to do..? sorry to ask again ..Mike

Link to comment
Share on other sites

did you not notice the tiny difference between the desc tag & the keywords tag: there is a comma ',' between pro name and breadcrimb in the keywords tag, whereas there is just a space ' ' between pro name and breadcrumb in the desc tag. so try to put a comma in it to see of that makes a difference.

 

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

did you not notice the tiny difference between the desc tag & the keywords tag: there is a comma ',' between pro name and breadcrimb in the keywords tag, whereas there is just a space ' ' between pro name and breadcrumb in the desc tag. so try to put a comma in it to see of that makes a difference.

 

Ken

 

 

Hi Ken yes I did that on purpose so the description wouldn’t have any commas in and read as one long string but for the keywords I wanted to "," ... but cant seem to get it in before the actual product name but it does aper every were else

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