Forums / Templates, Stylesheets, Page Layout / Automatic Meta tags generation

Automatic Meta tags generation

Locked

Views: 17,767

Results 21 to 40 of 55
This thread is locked. New replies are disabled.
9 Jul 2008, 6:23 PM
#21
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Automatic Meta tags generation

Qwert302:

I'm just clarifying here.

You still have a huge string of meta keywords. Did you put those in on purpose from the meta_tags.php?

I put those in on purpose

define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . $category_metatags->fields['categories_name'] . SECONDARY_SECTION . 'emo, fetish, punk, gothic, goth, rockabilly, lolita, alternative, industrial, boots, shoes, accessories, handbags, bags, fingerless gloves, skeleton gloves, umbrellas, ............, International Postage'));

10 Jul 2008, 8:18 PM
#22
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Automatic Meta tags generation

Here's a post I found that seems to have worked for my site.

The file I modified with the following info is located at:

/includes/templates/your_custom_template/common/html_header.php

I'm using version 1.3.8

 Originally Posted by www.scifi-models.com
Hi there... I have an easy answer for everyone on this...


Search for this line in your_template/common/html_header.php..

<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />

Should be near the top, line 27.

Delete the line and replace with the following:

<?php $slashpos = strrpos($_SERVER['REQUEST_URI'],"/");
if ($slashpos === false || $slashpos == strlen($_SERVER['REQUEST_URI'])) {
$thispage = $_SERVER['REQUEST_URI'];
}
else
{
$thispage = substr($_SERVER['REQUEST_URI'],$slashpos+1,strlen($_SERVER['REQUEST_URI'])-1);
}
if ($thispage == "index.php" || $thispage == "index.php?main_page=index" || $thispage == "") {
echo '<meta name="keywords" content="scifi models,star trek resin props,star trek models,movie memorabilia,t-virus prop,enterprise prop,maco,replica movie props,prop reproductions,resin props,battlestar resin prop"/>';
}
else
{
echo '<meta name="keywords" content="' . META_TAG_KEYWORDS . '" />' ;
} ?>



This will replace the dynamic keywords it generates automatically words to a set keywords for the main index.php page, and send the dynamic keywords for products. Hope this helps! Thanks to synavia for her code for checking which page your on!

Hope this helps.

Zencart ROCKS!

www.ZenCrystals.com
www.CraftMagick.com
Magickal & Metaphysical supplies/services

11 Jul 2008, 7:03 AM
#23
kdnmiller avatar

kdnmiller

New Zenner

Join Date:
Jun 2008
Posts:
15
Plugin Contributions:
0

Re: Automatic Meta tags generation

Right, i think thats the thread i refered to in my previous posting. However this will fix your "keyword content" tags and if you change the other code also your "description' tag.

However this works only for the main page, if you check on your products and view the source, zen still spams these pages. You can influence that a bit by defining meta tags in your admin but that does not stop Zen from putting in the keywords.

Also i have no idea how to define tags for EZ-pages.. ???

12 Jul 2008, 12:49 AM
#24
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Automatic Meta tags generation

Thanks kdnmiller, and yes i saw your post(#19) with the link but when i clicked it, it went to something about 'auto email generation' so i did a search under posts done by your username and that's how i found the right thread and decided to include the info in my post (#21) in case anyone else had the same problem :smile:

And for whatever reason, the above 'fix' actually stopped spamming both my home page AND my product meta tags (that is, the ones that I've had time to update with the biohazard link)

So hopefully these posts will help others and maybe one of us will figure out why it's not stopping the product meta tag spamming on your site, too. If i find any additional solutions i'll post them back here, too.

Have a great weekend and thanks again!

Zencart ROCKS!

www.ZenCrystals.com
www.CraftMagick.com
Magickal & Metaphysical supplies/services

17 Jul 2008, 11:11 PM
#25
mikedeezy33 avatar

mikedeezy33

New Zenner

Join Date:
Jun 2007
Location:
San Diego, CA
Posts:
61
Plugin Contributions:
0

Re: Automatic Meta tags generation

Hey guys -
I wanted to have a little more over which categories show up in the meta tag keywords, so I coded a mod which basically adds a checkbox in the admin asking whether the category should be included in** site wide **keywords. Note that the keywords will still show on the category pages, but now not on the home page or other pages, such as the contact page.

I hope this helps some of you. If anyone tries it and has any questions let me know. I am thinking of expanding on this mod, adding more control over meta tags, especially for ez pages. Any suggestions?

The link below is the original post with the code for the mod.
zen-cart.com/forum/showpost.php?p=534671&postcount=5

25 Aug 2008, 3:24 PM
#26
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

Good morning. I am attempting to change the meta information on the home page ONLY.
In meta_tag.php there is a section that is supposed to allow me to do this:
// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', ' ');
define('HOME_PAGE_META_KEYWORDS', ' ');

I am using a custom template called "aaadisplay". I have entered the updated information in
/includes/languages/english/aaadisplay/meta_tag.php
but still just get the category info

I also entered the updated information in
/includes/languages/english/meta_tag.php
in the event that the override was not functioning but stll no change.

Any ideas?

H. Light
Florida

25 Aug 2008, 6:12 PM
#27
kdnmiller avatar

kdnmiller

New Zenner

Join Date:
Jun 2008
Posts:
15
Plugin Contributions:
0

Re: Automatic Meta tags generation

Hi, i myself have one site that also has this code in meta-tag.php and it worked for me. I did not needed to go through the whole process described above, and the tags were changed on the mainpage..

Make sure you are editing the correct meta-tag.php, there may be more than one.. mine is located at /includes/languages/english/meta_tag.php and not /includes/languages/english/myzenshop/meta_tag.php as you stated.

I left SITE TAGLINE and CUSTOM KEYWORDS blank and only used the HOME_PAGE_META sections... also have defined product meta tags in your admin.

If this all still does not work you can still edit /includes/templates/your_custom_template/common/html_header.php

cheers
mike

25 Aug 2008, 10:32 PM
#28
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

Thanks for taking the time to respond.
I made the changes in both locations just in case and neither seem to do a darn thing. Bummer!

H. Light
Florida

26 Aug 2008, 6:31 AM
#29
kdnmiller avatar

kdnmiller

New Zenner

Join Date:
Jun 2008
Posts:
15
Plugin Contributions:
0

Re: Automatic Meta tags generation

You mean you changed both files: meta_tags.php AND html_header.php ??

again are you sure you are editing the correct meta tag file?? make change to the title tag in the file and use source code to check if it was changed..

27 Aug 2008, 4:24 AM
#30
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

I did not edit html_header.php.
I edited both copies of meta_tags.php. One in my template directory /includes/languages/english/aaadisplay and one in /includes/languages/english in the event it was not looking in the correct directory.

I could not figure out what to edit html_header.php. There did not seem to be anything there that was specific to the home page and I did not want to make a global change. I hope you can understand what I am attempting to explain.

Is this function a part of version 1.3.8? I am running 1.3.7. I have searched for the string "home_page_meta" and do not find it in any other file on my system. So I wonder what good is ther variable if it is not used elsewhere?

Thanks again for trying to help me.

H. Light
Florida

27 Aug 2008, 5:10 AM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Automatic Meta tags generation

Custom meta-tags for just the home page was a feature added in v1.3.8.
You won't find that option in v1.3.7 or earlier.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Aug 2008, 7:34 AM
#32
kdnmiller avatar

kdnmiller

New Zenner

Join Date:
Jun 2008
Posts:
15
Plugin Contributions:
0

Re: Automatic Meta tags generation

Right, you have the same zen 1.3.7 like me. Nothing can be done about the homepage tags when editing the meta-tags.php. You have to edit the html_header.php, thats the only way. But make sure you made a backup.. there is the line:

<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" /> and under that the same line with : "description", you have to replace both lines with code.
27 Aug 2008, 8:31 AM
#33
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Automatic Meta tags generation

kdnmiller:

Right, you have the same zen 1.3.7 like me. Nothing can be done about the homepage tags when editing the meta-tags.php. You have to edit the html_header.php, thats the only way.
No, that's not the only way.

If you're convinced that sticking with old 1.3.7 code and its limitations, instead of upgrading to 1.3.8 with its many bugfixes and feature improvements, then you can manually implement the home-page-specific-metatags support by following the instructions posted elsewhere on the forum: http://www.zen-cart.com/forum/showthread.php?t=62726

But you'd be better off upgrading.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Aug 2008, 10:32 PM
#34
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

Thank you both for you input. I am a little afraid of upgrading because of the many changed that have been made to my site.
I hate to be the village idiot but can I clone my site, upgrade and see what happnes? Then if everything goes well, I can do the upgrade on the live site?
Thank you again!

H. Light
Florida

27 Aug 2008, 10:43 PM
#35
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: Automatic Meta tags generation

Yes, practicing an upgrade is always recommended.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

27 Aug 2008, 10:54 PM
#36
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

YOU ARE THE MAN! I have been beating my head against the wall for weeks on this one.
I just completed the simple modification and it worked like a charm!
Thank you so much!

H. Light
Florida

27 Aug 2008, 11:07 PM
#37
hllight avatar

hllight

Zen Follower

Join Date:
May 2007
Location:
Port Charlotte, FL
Posts:
125
Plugin Contributions:
0

Re: Automatic Meta tags generation

I purchased the manual when it first came out about a year ago. Unfortunately it is on my desk at the office so I will take a look in the morning. I did not see anything on creating a clone site on the tutorials.
Thanks for your help.

H. Light
Florida

17 Sep 2008, 12:05 AM
#38
seeinstars89 avatar

seeinstars89

New Zenner

Join Date:
Aug 2008
Posts:
29
Plugin Contributions:
0

Re: Automatic Meta tags generation

Ok I have been trying to get this to work all day and have gotten the keywords to not be my categories but the description still shows my categories.

It might be ok if it wasnt so long. One site says to keep it around 150 and another says 250 but either way it needs to be changed. How do i change it?

5 Oct 2008, 5:23 PM
#39
pet_herbal_remedies avatar

pet_herbal_remedies

Zen Follower

Join Date:
Aug 2008
Posts:
162
Plugin Contributions:
0

Re: Automatic Meta tags generation

I've read through the posts and I have 1.3.8 which I assume means I shouldn't be having any issues, per Dr. Byte. Did I understand that correctly?

Yet I can't understand why my meta descriptions are not showing up in the S.E.R.P's. Instead the description shows a description that appears to be 'by default' not by what I entered.

For Ex: Runipoo Relief; I entered in the meta-description:

FREE SHIPPING. Is your pet experiencing chronic diarrhea? Runi Poo Relief is a Natural Cat and Dog Diarrhea Remedy. RuniPoo Relief is a 100% natural remedy that supports digestive balance, healthy bowel functioning and firm stools. Easy to administer, RuniPoo Relief is a liquid tincture that can be discreetly added to your pet’s treat or food.

Yet this is what shows up when googled:

RuniPoo Relief - - $41.95 : Pet Herbal Remedies:, Treating Our ...
Pet Herbal Remedies: RuniPoo Relief - - No more runny stools in your cat or dog with ... Write Review. This product was added to our catalog on Sunday 14 ...
petherbalremedies.com/index.php?main_page=index&cPath=2_17 - 33k - Cached - Similar pages - Note this

What am I missing? :unsure:
Lynn
http://www.PetHerbalRemedies.com

6 Oct 2008, 4:25 AM
#40
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Automatic Meta tags generation

Pet Herbal Remedies:

I've read through the posts and I have 1.3.8 which I assume means I shouldn't be having any issues, per Dr. Byte. Did I understand that correctly?

Yet I can't understand why my meta descriptions are not showing up in the S.E.R.P's. Instead the description shows a description that appears to be 'by default' not by what I entered.

For Ex: Runipoo Relief; I entered in the meta-description:

FREE SHIPPING. Is your pet experiencing chronic diarrhea? Runi Poo Relief is a Natural Cat and Dog Diarrhea Remedy. RuniPoo Relief is a 100% natural remedy that supports digestive balance, healthy bowel functioning and firm stools. Easy to administer, RuniPoo Relief is a liquid tincture that can be discreetly added to your pet’s treat or food.

Yet this is what shows up when googled:

RuniPoo Relief - - $41.95 : Pet Herbal Remedies:, Treating Our ...
Pet Herbal Remedies: RuniPoo Relief - - No more runny stools in your cat or dog with ... Write Review. This product was added to our catalog on Sunday 14 ...
petherbalremedies.com/index.php?main_page=index&cPath=2_17 - 33k - Cached - Similar pages - Note this

What am I missing? :unsure:
Lynn
http://www.PetHerbalRemedies.com

On your site, your metatags show:

<title>RuniPoo Relief - No more runny stools in your cat or dog with RuniPoo Relief. [] - $41.95 : Pet Herbal Remedies:, Treating Our Pets With Natural, Effective Herbs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content=" *** content removed for brevity *** " />
<meta name="description" content="FREE SHIPPING. Is your pet experiencing chronic diarrhea? Runi Poo Relief is a Natural Cat and Dog Diarrhea Remedy. RuniPoo Relief is a 100% natural remedy that supports digestive balance, healthy bowel functioning and firm stools. Easy to administer, RuniPoo Relief is a liquid tincture that can be discreetly added to your pet’s treat or food. " />

As you can see, the description is correct ... matching what you said you've entered. Thus, any difference between what Google shows vs your site is most likely simply related to when they last crawled that page, which appears to be Sept 20.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.