Zen Cart Logo
Forums / General Questions / where do i put meta description for the index page?

where do i put meta description for the index page?

Locked

Views: 18,316

Results 1 to 20 of 32
This thread is locked. New replies are disabled.
21 Jan 2007, 3:27 AM
#1
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

where do i put meta description for the index page?

Hi.

Where do I do this? I checked the include/languages/english/mytemplate/meta_tags.php and I cannot find the line for a meta description....this is what i see in my meta_tags.php

// page title
define('TITLE', my title goes here');

// Site Tagline
define('SITE_TAGLINE', '');

// Custom Keywords
define('CUSTOM_KEYWORDS', my keywords go here');

// Review Page can have a lead in:
define('META_TAGS_REVIEW', 'Reviews: ');

// separators for meta tag definitions
// Define Primary Section Output
  define('PRIMARY_SECTION', ' : ');

// Define Secondary Section Output
  define('SECONDARY_SECTION', ' - ');

// Define Tertiary Section Output
  define('TERTIARY_SECTION', ', ');

// Define divider ... usually just a space or a comma plus a space
  define('METATAGS_DIVIDER', ' ');

however, there is no meta description? where should I put it?

Thanks

22 Jan 2007, 3:29 PM
#2
lib99 avatar

lib99

Totally Zenned

Join Date:
Dec 2004
Location:
New York, USA
Posts:
965
Plugin Contributions:
0

Re: where do i put meta description for the index page?

metatag information is dynamically generated from includes/modules/meta_tags.php

You might wante to look at the following (archived) thread for some additional explanation and guidance...
http://www.zen-cart.com/forum/showthread.php?t=23291

6 Jun 2007, 3:34 PM
#3
ictadvis avatar

ictadvis

New Zenner

Join Date:
Oct 2006
Location:
Glenrothes Fife Scotland
Posts:
11
Plugin Contributions:
0

Re: where do i put meta description for the index page?

I would like to join in on what zenner bangsters is discussing regarding Meta Description Tag for the main (home) page of the website.

I have read the replies bangster recieved and the links provided that took him back to comments made in 2005.

We are in 2007, infact June 2007 and with the latest version of Zen Cart used to build some of our client sites.

None of the answers I have seen reflect what I think both bangster and I seek.
Someone who replied (can't remember who now) obviously hadn't read the email from bangster properly as they said that there is full control over Title, Description and Keywords for products in ZEN CART.
YES - we know this - read the email - the focus is on the MAIN PAGE of the site, a VERY IMPORTANT PAGE. Now I know someone will come back now and say - why worry about the META DESCRIPTION TAG at all. Well, as an SEO person I still see some relevance of this tag under certain operating conditions, so I want to have the ability to script this tag myself just like I can do down at the PRODUCT level.

I have also seen a new product having its profile raised this month from a company who claim to have 'Magic Software' that will deal with SEO URL issues for both ZENCART and OSCOMMERCE. This software once installed apparently addressess the issues on all the gibbly gog stuff that follows the domain name when you are in lower level pages within the shopping cart site. I don't want to introduce clients to it yet until some casestudy evidence comes to the surface from someone.
So, ANYBODY TRIED IT YET!!

Cheers

ICTADVISOR

8 Jun 2007, 2:23 AM
#4
etal2000 avatar

etal2000

New Zenner

Join Date:
Feb 2007
Posts:
14
Plugin Contributions:
0

Re: where do i put meta description for the index page?

I too am trying to figure this out without being a programmer and being totally new with zen and php.
I found the meta_tag php but dumb me does not see "DESCRIPTION".
Just like Bangsters I see: TITLE, SITE TAG LINE, and CUSTOM KEYWORDS.

I did a meta tag analyzer and it came up with different keywords than defined in the meta_tag.php??:huh:

The analyzer did read under description my title, tag line and keywords?

I read through the other archieved thread but it seems to be too old since the files they refer to don't seem to exist on my server.

So what I am trying to figure out is how to get the search engines to read my main page meta tag description. Can I just add that line in the meta_tag.php?

Any help is very much appreciated!

8 Jun 2007, 7:04 AM
#5
ictadvis avatar

ictadvis

New Zenner

Join Date:
Oct 2006
Location:
Glenrothes Fife Scotland
Posts:
11
Plugin Contributions:
0

Re: where do i put meta description for the index page?

[quote=etal2000;386495]

Hi Etal
After posting up my thoughts on this website about the position I found myself in I continued to trawl for any snippet I could found on this topic. It is amazing to find this website really does have an abundant amount of people's knowledge stashed away in its depths. Why I am opening with this line, because I found the answer tucked away in one of these magical threads.

The answer does lay with the Meta_Tags.php file which you will find in INCLUDES/MODULES/. Bring that file down to your PC and edit it. Look for line 54 that starts with:

($_GET['main_page']) {
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book': blah blah blah and so on.

NOW add this code after
switch ($_GET['main_page']) {

case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag for the Home Page ');
define('META_TAG_DESCRIPTION', This is Your Descriptive Tag for the Home Page.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword,for the Home Page,');
break;
And what you should have end having is something like this:


switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag ');
define('META_TAG_DESCRIPTION', 'This is Your Descriptive Tag.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword');
break;
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book':

I am finding that sometimes People write in riddles or have trouble trying to get there message across and not very specific when it comes to signposting someone. I also believe that people have made certain amendments to their file structure when building their cart and not everyone is arriving at the same folder in their file structure when trying to follow someone's instructions.

I passed this info across to another developer in the North of Scotland and within minutes I had an email that said great!! It Works.

One point I have applied this fix to the latest version of ZEN CART that one of my clients is using. What I have not done yet is inserted into an older version of ZEN CART, which is a few versions behind and has not been upgraded yet. But I did look at the Meta_Tags.php file that is in the same place and appears not dissimilar to the latest version, so I am looking towards it fixing the problem here also. The other problem this older site also has is you cannot edit the Meta Tags at the CATEGORY level only the PRODUCT level. So another challenge maybe??????

Well I am off to keep my ZEN CUSTOMERS in profit, hope all this helps Etal.

8 Jun 2007, 3:35 PM
#6
deshojo avatar

deshojo

New Zenner

Join Date:
Oct 2006
Posts:
35
Plugin Contributions:
0

Re: where do i put meta description for the index page?

This is just what I've been looking for :smile: although I've never added any coding yet - bit of a big step for me - it's been a sharp learning curve !

Will it work with v.1.3.6? at the moment my site description on Google shows as just a list of my categories .... :cry:

11 Jun 2007, 8:39 AM
#7
ictadvis avatar

ictadvis

New Zenner

Join Date:
Oct 2006
Location:
Glenrothes Fife Scotland
Posts:
11
Plugin Contributions:
0

Re: where do i put meta description for the index page?

Hey Deshojo

I believe this code amendment will work in ver 1.3.6 although I have not tried it yet. However, I did take a look at the file and compare it with that in 1.3.7 and they look the same. I will get round to trying it out.

For you to undertake this exercise of putting the code in, well it is basically a cut and paste exercise either using notepad to edit the file or the old industry standard dreamweaver product. Just do one thing before you start - backup your original file, so that if you experience a problem you know you can put that one back in place until you work things out.

Best success to you from

Scotland & the UK's ICT Advisor

15 Jun 2007, 10:28 AM
#8
deshojo avatar

deshojo

New Zenner

Join Date:
Oct 2006
Posts:
35
Plugin Contributions:
0

Re: where do i put meta description for the index page?

Hi Brian :smile:

I did as you suggested but I'm sorry to say I failed - I received this warning for line 58:

Parse error: syntax error, unexpected T_STRING

I did check to see that the coding was the same as mentioned above.

Perhaps this won't work on my version :(

Kind regards

Anne

16 Jun 2007, 10:29 AM
#9
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: where do i put meta description for the index page?

If you simply pasted that code into a simple text editor (such as Notepad) then you won't have spotted the error...

define('META_TAG_DESCRIPTION', This is Your Descriptive Tag for the Home Page.
');

is missing a single quote and should be

define('META_TAG_DESCRIPTION', 'This is Your Descriptive Tag for the Home Page.
');

TIP: Use something like Notepad++ or Crimson Editor which colour codes the code and often gives a good visual clue whjen soething is wrong.

20 Jun 2007, 2:53 PM
#10
etal2000 avatar

etal2000

New Zenner

Join Date:
Feb 2007
Posts:
14
Plugin Contributions:
0

Re: where do i put meta description for the index page?

Thank you so much!!!! I've got it working. You are my hero!

21 Jun 2007, 5:04 PM
#11
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: where do i put meta description for the index page?

And my thanks to you too.....i was hair-pulling.

21 Jun 2007, 6:45 PM
#12
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: where do i put meta description for the index page?

What does adding this code do?????

The answer does lay with the Meta_Tags.php file which you will find in INCLUDES/MODULES/. Bring that file down to your PC and edit it. Look for line 54 that starts with:

($_GET['main_page']) {
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book': blah blah blah and so on.

NOW add this code after
switch ($_GET['main_page']) {

case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag for the Home Page ');
define('META_TAG_DESCRIPTION', This is Your Descriptive Tag for the Home Page.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword,for the Home Page,');
break;
And what you should have end having is something like this:


switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag ');
define('META_TAG_DESCRIPTION', 'This is Your Descriptive Tag.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword');
break;
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book':

I am finding that sometimes People write in riddles or have trouble trying to get there message across and not very specific when it comes to signposting someone. I also believe that people have made certain amendments to their file structure when building their cart and not everyone is arriving at the same folder in their file structure when trying to follow someone's instructions.

I passed this info across to another developer in the North of Scotland and within minutes I had an email that said great!! It Works.

21 Jun 2007, 7:56 PM
#13
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: where do i put meta description for the index page?

When the page the browser is on is the home page ($this_is_home_page == true) then the Title, Keyword and Description metatags are as defined here

21 Jun 2007, 8:38 PM
#14
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: where do i put meta description for the index page?

First thanks for replying. I have so many questions out there that no one has replied to... I appreciate it. :-)

Oh.... Then what does Zen Cart put for title, keywords, and description without using this code mod???

22 Jun 2007, 7:01 AM
#15
dechamp avatar

dechamp

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: where do i put meta description for the index page?

[quote=ictadvis;386595]> etal2000:

The answer does lay with the Meta_Tags.php file which you will find in INCLUDES/MODULES/. Bring that file down to your PC and edit it. Look for line 54 that starts with:

($_GET['main_page']) {
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book': blah blah blah and so on.

NOW add this code after
switch ($_GET['main_page']) {

case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag for the Home Page ');
define('META_TAG_DESCRIPTION', This is Your Descriptive Tag for the Home Page.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword,for the Home Page,');
break;
And what you should have end having is something like this:


switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'This is Your Title Tag ');
define('META_TAG_DESCRIPTION', 'This is Your Descriptive Tag.
');
define('META_TAG_KEYWORDS', 'Keyword,Keyword,Keyword,Keyword');
break;
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book':

Finally, I feel like I have a little bit of control over some of the arbitrary, and automatic aspects of this cart.:flex: This worked well and was easy to do.

I've been working with a store rebuild from an old broken version of another cart for a couple of weeks and most of the additional features of Zen Cart have been welcome.

The templates make sense and CSS is very powerful, but sometimes you want to put your mark on a homepage and use descriptions and keywords of your own. I really didn't see any point in the Description tag just saying a list of the same keywords the site gleans from the categories.

You're a prince for dredging up this jewel. Thanks!

22 Jun 2007, 8:07 AM
#16
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: where do i put meta description for the index page?

gsdcypher:

First thanks for replying. I have so many questions out there that no one has replied to... I appreciate it. :-)

Oh.... Then what does Zen Cart put for title, keywords, and description without using this code mod???

Whatever you have set in your includes/languages/english/YOUR_TEMPLATE/meta_tags.php for default site-wide behaviour.

Questions that go unanswered are usually so because either no-one knows, the person who does know hasn't seen it (with several hundred new posts per day some are bound to get missed), the question is an FAQ that a bit of searching/reading would have answered, or sometimes, the rest of us are probably thinking - why doesn't the poster simply look at their cart and see what the current situation is! :wink:

22 Jun 2007, 10:44 AM
#17
ictadvis avatar

ictadvis

New Zenner

Join Date:
Oct 2006
Location:
Glenrothes Fife Scotland
Posts:
11
Plugin Contributions:
0

Re: where do i put meta description for the index page?

gsdcypher:

What does adding this code do?????

Hi,

The problem we have been rectifying is all to do with improving the SEO of the product.

Whilst their was adequate facilities at the product level of ZEN CART that allowed you to write specific TITLE, DESCRIPTIVE and KEYWORD tags for each product thus producing a 'themed' page focused on that product. There were issues at the 'CATEGORY' level where ZEN CART was not providing editorial control to the same level.

The CATEGORY level is also important as this is a key 'LANDING' page area for your customers. Think of a department store with a multitude of doors you can enter. Whilst your HOME page says - I am this type of company, think then how you would lead your visitor from that 'TOP DOOR' down into your web shop. You would be saying, in this room I have xxx and this would be CATEGORY one with an indvidual them, for example 'INDUSTRIAL FOOTWEAR' this CATEGORY might break down into WORKING BOOTS, STEEL TOED SHOES ect.

So what the problem was not being able to write a specific TITLE DESCRIPTIVE KEYWORD TAG for the CATEGORY - INDUSTRIAL FOOTWEAR, and ensuring you were not also automatically seeing the HOME page TITLE DESCRIPTIVE and KEYWORD tag appear automatically alongside the CATEGORY descriptions which then made these descriptions to long.

Hope this helps

THE ICT ADVISOR.COM team

22 Jun 2007, 12:55 PM
#18
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: where do i put meta description for the index page?

You can already enter metatag info for categories in the same way as for products.

22 Jun 2007, 9:10 PM
#19
murphyslaw avatar

murphyslaw

New Zenner

Join Date:
Mar 2007
Posts:
4
Plugin Contributions:
0

Re: where do i put meta description for the index page?

Might be worth mentioning that it might be a good idea to save your modified meta_tags.php in /includes/modules/YOUR_CUSTOM_FILE_NAME/meta_tags.php rather than directly in /includes/modules/meta_tags.php

23 Jun 2007, 6:03 AM
#20
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: where do i put meta description for the index page?

Ryk:

Whatever you have set in your includes/languages/english/YOUR_TEMPLATE/meta_tags.php for default site-wide behaviour.

the rest of us are probably thinking - why doesn't the poster simply look at their cart and see what the current situation is! :wink:

True dat. And I did. I just didn't know what ZC was using for that info. Or rather where it was getting that info. Apparently it is gleaning it from my category links???

So the code improves SEO for ZC by providing control over what meta information appears on the home page... Seems like an important piece of code! And if I understand correctly (not likely) you cannot do that without using this code.

Cool. And thanks ictadvis for code and def.