Forums / Templates, Stylesheets, Page Layout / mmmm...Meta Tags - help/guidance needed

mmmm...Meta Tags - help/guidance needed

Locked

Views: 29,795

Results 1 to 20 of 89
This thread is locked. New replies are disabled.
31 May 2006, 23:18
#1
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

mmmm...Meta Tags - help/guidance needed

I'm in the process of populating the shop and would like some guidance on Meta Tags. What all goes in each section? -meta tag title (I think this is what goes in the title bar of the browser, yes? no? do I win a carrot?) -meta tag keywords (okay, this one is self explanatory :) ) -meta tag description

is it possible to make metatags match for various products so I don't have to keep entering them?

And finally, are there multiple Meta_tags.php file? I took a copy, placed it in my override file and yet if I select "title/tagline" in "Mark what the product's meta tag title should include" in the preview it says "Zencart, the art of e-commerce" yet I have edited and confirmed that i have changed the metatag title & tagline and it is working just fine.

TIA :D

31 May 2006, 23:29
#2
sermonzone avatar

sermonzone

Zen Follower

Join Date:
Oct 2005
Location:
New Mexico
Posts:
365
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

-meta tag title - you win the prize -meta tag keywords - two for two -meta tag description - you must enter a description. What does your customer want to know about the product.

is it possible to make metatags match for various products so I don't have to keep entering them? I know this can be done by copying attributes from one product to another and to a category. Not my area of expertise thought. Suggest you search on copying product attributes and see what you find.

And finally, are there multiple Meta_tags.php file? Yes. You want to edit includes\languages\english\YOUR-TEMPLATE\meta_tags.php. Make sure your have the custom template turned on in the Admin and that you have edited the correct file and have it uploaded to the correct folder.

I took a copy, placed it in my override file and yet if I select "title/tagline" in "Mark what the product's meta tag title should include" in the preview it says "Zencart, the art of e-commerce" yet I have edited and confirmed that i have changed the metatag title & tagline and it is working just fine. See above. Do not be surprised to discover that what you have 'edited and confirmed' is surprisingly not in the right place. Imagine my own red face when I did it.

31 May 2006, 23:34
#3
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Sermonzone:

-meta tag description - you must enter a description. What does your customer want to know about the product.

Thanks Bruce. Sorry to be so incredibly thick in the head, but I do have a product description written, so what does this meta tag description do?

31 May 2006, 23:50
#4
sermonzone avatar

sermonzone

Zen Follower

Join Date:
Oct 2005
Location:
New Mexico
Posts:
365
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

The product description is what you entered in the products catalog page correct? That is the 'visible' description. Meta-tags are the 'invisible,' behind the scenes things that get chewed up by search engines, allegedly. You must have all 3 meta boxes populated for the product meta-tag to work.

Perhaps you would try a one sentence version of the product description. Also, you see what other people have done by viewing the page source. Find a site with similar products and compare the visible product description with the meta-tag description.

Let me know what you find.

01 Jun 2006, 00:03
#5
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

ah. well that certainly explains it :) And you're right on - thanks again. I guess I get to put my summarizing skills to work. LOL.

03 Jun 2006, 23:53
#6
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Is it no longer true that if there is no meta tag for a product, Zen Cart will use the product description as the default?

04 Jun 2006, 01:00
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

It will use that ... unless of course you have "the bug" and not "the bug fix" ... :cry:

Now to remember where I put that fix ... :unsure:

04 Jun 2006, 01:04
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Try editing the /includes/functions/functions_general.php and replace this whole function:

////
// return truncated paragraph
  function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') {
    $zv_paragraph = "";
    $word = explode(" ", $paragraph);
    $zv_total = count($word);
    if ($zv_total > $size) {
      for ($x=0; $x < $size; $x++) {
        $zv_paragraph = $zv_paragraph . $word[$x] . " ";
      }
      $zv_paragraph = trim($zv_paragraph);
    } else {
      $zv_paragraph = trim($paragraph);
    }
    return $zv_paragraph;
  }

Let me know if that fixes you up ...

04 Jun 2006, 05:49
#9
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh:

Try editing the /includes/functions/functions_general.php and replace this whole function:

//// // return truncated paragraph function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') { $zv_paragraph = ""; $word = explode(" ", $paragraph); $zv_total = count($word); if ($zv_total > $size) { for ($x=0; $x < $size; $x++) { $zv_paragraph = $zv_paragraph . $word[$x] . " "; } $zv_paragraph = trim($zv_paragraph); } else { $zv_paragraph = trim($paragraph); } return $zv_paragraph; }

> 
> Let me know if that fixes you up ...

Unfortunately, that fix did not fix my problem. Please diagnose this as it's practically impossible to add meta tag to thousands of products one at a time nor do I want to revert back to 1.2.7

Thanks!
04 Jun 2006, 08:46
#10
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh, I just want to report back that I tested the issue on a clean install of 1.3.0.1 and Zen Cart is still not picking up description if meta tag doesn't exist for products.

Upon further review I compared the change you proposed with the original file from 1.3.0.1 and there is absolutely no difference between the changes you suggested and the clean file downloaded for 1.3.0.1. Is that the problem that the bug fix you gave is actually not a bug fix?

Thanks!

04 Jun 2006, 15:31
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Odd ... this is what is in v1.3.0.1 ...

////
// return truncated paragraph
  function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') {
    $zv_paragraph = "";
    $word = explode(" ", $paragraph);
    $zv_total = count($word);
    if ($zv_total > $size) {
      for ($x=0; $x < $size; $x++) {
        $zv_paragraph = $zv_paragraph . $word[$x] . " ";
      }
      $zv_paragraph = trim($zv_paragraph);
    }
    return $zv_paragraph;
  }

This is the new code:

// return truncated paragraph
  function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') {
    $zv_paragraph = "";
    $word = explode(" ", $paragraph);
    $zv_total = count($word);
    if ($zv_total > $size) {
      for ($x=0; $x < $size; $x++) {
        $zv_paragraph = $zv_paragraph . $word[$x] . " ";
      }
      $zv_paragraph = trim($zv_paragraph);
    } else {
      $zv_paragraph = trim($paragraph);
    }
    return $zv_paragraph;
  }
04 Jun 2006, 22:08
#12
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh,

Thanks for the reply. I downloaded a new copy of the Zen Cart 1.3.0.1 full set pack, applied the change, deleted the one on the server and copied the new one there. There problem is still not solved.

I went to the site review section to see if others are experiencing the problem and I have pasted a few sites that have descriptions but there are not being auto populated for meta tag description. Is this a bug or we are all missing something, missing a configuration setting or have hosting/server issues?

This obviously cannot be a good thing for shop owners.

Here are some samples sites that have the same problem but may not know it :)

http://shopjackiesjewels.com/index.php?main_page=product_info&cPath=2&products_id=16 http://racemode.ca/index.php?main_page=product_info&cPath=2_7&products_id=48 http://www.edgewatergifts.com/lift-the-lid-on-gladiatorsbrby-philip-wilkinson-p-79.html

If you need more information please let me know.

Thanks for looking into this.

BTW, Are you able to get the default clean install to auto-generate the description for products? I was not able to make that work either and a few site I visited that have the clean install with sample products do not have it working either.

05 Jun 2006, 02:18
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

I donwnload a clean v1.3.0.1 from our link to SourceForge ...

Meta Tags are broken on the auto generated code for description ... I applied the same change I have asked you to try and it fixed it ...

Make one change to the file: /includes/functions/functions_general.php

New Code to replace the function zen_truncate_paragraph by adding the else statement:

////
// return truncated paragraph
  function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') {
    $zv_paragraph = "";
    $word = explode(" ", $paragraph);
    $zv_total = count($word);
    if ($zv_total > $size) {
      for ($x=0; $x < $size; $x++) {
        $zv_paragraph = $zv_paragraph . $word[$x] . " ";
      }
      $zv_paragraph = trim($zv_paragraph);
    } else {
      $zv_paragraph = trim($paragraph);
    }
    return $zv_paragraph;
  }

You may wish to check your site with something like Beyond Compare and see what it is that is not allowing this fix to work for you ...

05 Jun 2006, 10:06
#14
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh,

I was finally able to get the patch to work on a clean install. Unfortunately, the patch did not work with my 1.2.7 upgrade. I suspect that my problem is either a setting in Admin or Database problem. I did a file compare of all Admin/Include folders files and they matched. I don't know why it works for me on a clean install but not upgrade. It's also possible that I have a contribution affecting but I have installed all the contributions I have on a clean install and it didn't break the auto generation. I wished I know what I am doing wrong.

If you have any other troubleshooting ideas please pass it on.

Thanks!

05 Jun 2006, 13:16
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Check and see if you are using any kind of overrides on the /includes/modules/meta_tags.php or if you have altered the original ...

05 Jun 2006, 14:44
#16
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh:

Check and see if you are using any kind of overrides on the /includes/modules/meta_tags.php or if you have altered the original ...

Ajeh, thanks again for working with me on this...I have replaced all files on the server with a new downloaded file and I do not have any override in that folder.

I am using the stock meta_tags.php in includes/module. This is driving me crazy...stayed up all night but made no progress.

05 Jun 2006, 18:20
#17
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh,

I thought I'd let you know that I have now narrowed the problem to two scenarios...

Everything works fine once the patch is applied if it is a **clean **install of 1.3.0.1 When I upgrade 1.2.7 to 1.3.0.1 and then apply the patch, it **does not **fix the auto generation issue for product description meta tag. Any ideas?

05 Jun 2006, 21:45
#18
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Okay, I finally figured out the problem, at least I think I did. I compared the live store database which is an upgrade and a clean install of 1.3.0.1 database.

The following are missing in my life database configuration and I have a feeling it might be related.

INSERT INTO `configuration` VALUES ([B]336[/B], 'Meta Tags Generated Description Maximum Length?', 'MAX_META_TAG_DESCRIPTION_LENGTH', '50', 'Set Generated Meta Tag Description Maximum Length to (words) Default 50:', 18, 71, NULL, '2006-06-05 14:07:04', '', '');
INSERT INTO `configuration` VALUES ([B]338[/B], 'Site Map - include My Account Links?', 'SHOW_ACCOUNT_LINKS_ON_SITE_MAP', 'No', 'Should the links to My Account show up on the site-map?<br />Note: Spiders will try to index this page, and likely should not be sent to secure pages, since there is no benefit in indexing a login page.<br /><br />Default: false', 18, 73, NULL, '2006-06-05 14:07:04', NULL, 'zen_cfg_select_option(array(''Yes'', ''No''), ');

I tried to insert these two missing configuration into the DB but got an error for duplicate key. I believe it's because 336/338 are already in use by another configuration option.

How do I get this into the database without the error?

Thanks!!!

06 Jun 2006, 01:37
#19
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Ajeh, thank you so much for working with me on this issue. I finally got it resolved. Once I entered

INSERT INTO `configuration` VALUES ('', 'Meta Tags Generated Description Maximum Length?', 'MAX_META_TAG_DESCRIPTION_LENGTH', '50', 'Set Generated Meta Tag Description Maximum Length to (words) Default 50:', 18, 71, NULL, '2006-06-05 14:07:04', '', '');

That fixed the problem. I am not sure how that configuration went away or if it was something introduced in 1.3.0.1 I am just glad this is fixed. Now on to other stuff :)

06 Jun 2006, 01:44
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Thanks so much for the update on this ... I have been racking my brain trying to figure out what could be wrong on your site ... never thought you might have a bad configuration_key or missing one ... :eek:

Thanks again for posting the solution to your mystery ... :smile: