Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default How to auto generate just product keywords from product page?

    Hello All,

    I am deeply frustrated with the automated keyword generator. I have an enormous database of almost 12,000 products and I am perfectly fine with automatic keyword generation... if those keywords came from the product description.

    Instead, my ZC scoops up a list of categories and inserts that as my meta keywords. Only 1 category is pertinent to any given product. The rest is useless clutter.

    ++++++++++
    Here is an actual example:
    I sell parts to repair medical equipment. A customer might search google for Shaft Link for Stryker 811 Autopsy Saw.

    In the product description I have listed my part number, after market part numbers, and list of about 12 other models this same product fits.... all great key words.

    Instead of using that, my ZC scoops a list of categories that are 100% irrelevant to my potential customer: Cast Cutters, Autoclaves and Sterilizers, Centrifuges, Dental Chairs, Infant Incubators, etc etc
    ++++++++++

    Is there a way to re-direct the keyword generator? I think it is scooping up hyper links instead of non-linked text.

    Maybe there is a php file controlling where ZC looks for key words? I assume that the product page is tagged with a beginning and end. Maybe I can edit the offending code to look within those product tags?

    I would be extremely grateful if someone could help me!

    Thanks in advance,
    Mike

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How to auto generate just product keywords from product page?

    If you understand PHP, you can customize the code in /includes/modules/YOUR_TEMPLATE_FOLDERNAME/meta_tags.php to do as you wish. The code in the early section of that file grabs the category names and uses them for partial content in keywords. The rest of the file then builds content based on page-specific information, depending what page the visitor is on. If the category stuff is truly irrelevant (and you're absolutely certain that it wouldn't be better to actually remove irrelevant categories from your database instead of editing code), then adjusting the category-related keyword code in that file might be an option for you to consider.
    .

    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.

  3. #3
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: How to auto generate just product keywords from product page?

    Hi DrByte,

    Thanks for pointing me in the right direction once again!

    Here is the code I found:
    // Get all top category names for use with web site keywords
    $sql = "select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status=1";
    $keywords_metatags = $db->Execute($sql);
    while (!$keywords_metatags->EOF) {
    $keywords_string_metatags .= zen_clean_html($keywords_metatags->fields['categories_name']) . METATAGS_DIVIDER;
    $keywords_metatags->MoveNext();
    }
    define('KEYWORDS', str_replace('"','',zen_clean_html($keywords_string_metatags) . CUSTOM_KEYWORDS));
    Can I simply delete that entire passage?

    Thanks,
    Mike

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How to auto generate just product keywords from product page?

    Again, I give a disclaimer: You should not be altering these parts of the code unless you have a VERY SOLID business reason for doing so. Way too many people start hacking away without actually properly fixing the CONTENT in their categories, category names, products, product descriptions, etc, all in the name of thinking they're experts in SEO, when in fact Zen Cart is very intentionally doing these things FOR YOUR BENEFIT. It's a rare situation that legitimately needs alteration to this section of the code.

    So, that said, if you've carefully assessed your categories and products, and feel that you need to keep categories in your store which have no relevance to SEO and thus are causing you problems, then you can override the normal intelligence by making adjustments to the code.

    The section of code you quoted is what builds the category names into the default keywords.

    A simpler way to bypass its use would be to define the KEYWORDS constant in your /includes/languages/YOUR_TEMPLATE_NAME/meta_tags.php file. That would prevent the code you quoted from being able to add the categories to it at all.
    .

    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.

  5. #5
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: How to auto generate just product keywords from product page?

    Thanks again DrByte!

    I am, as a matter of mathematically provable fact, an SEO expert. Not to come off as cocky, just pointing out a truth.

    I'll explain my logic in a moment. But first, I don't know how to 'adjust code, but I do not how to press the delete button.

    If I delete this passage, will my ZC simply skip the top level categories when it automatically creates meta keywords? Again, I want the automated meta generation... I just want to skip the top level categories.

    Thanks!

  6. #6
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: How to auto generate just product keywords from product page?

    Ok, logic... (I think I am pointing out a minor flaw in an otherwise awesome system, so I will take my time to explain)

    With regard to unrelated categories not being pertinent to specific products... this is actually very logical and I expect it is precisely the same truth on MOST websites.

    I have 22 top level categories, with approximately 700 subcategories going three clicks deep, leading to 11,600 product pages. The only place that the top level categories are pertinent is on my main pages (index, about us, etc). That should be the same on every site.

    Once you choose a top category, you have decided that the other 21 categories do not interest you. This is logical, makes sense, and is exactly how it should be. Not just on my site, but EVERY site.

    If all 22 categories interest you, then you will spend a very long, very frustrating time on my site.

    Maybe medical stuff is harder to relate to, so let's talk cars. Let's say you have a Ford Pinto sitting in your front yard that needs a new alternator. You visit a car part website that has 22 makes as top level categories (Ferrari, Mazda, Honda, etc, and, of course, Ford).

    Since you have a Ford, nothing else matters. Next you pick your year, no other categories matter (just as it should be). Now you pick your model and so on.

    But just because you have a Ford does not mean that the other categories should not matter to the next guy (or search engine bots)! It just does not matter to the specific part you want (or that I am trying to sell).

    Ultimately, you may google "Pinto Alternator OEM Part 123456". The keywords that might be pertinent to you have covered over with a flood of useless words like Ferrari, Honda, Lamborghini, Mazda, bla bla bla. ZC never even scooped up the OEM part number, even though it is right there on the product description!

    Similarly, my top level categories are NOT irrelevant to my site, only to a specific part that must be drilled down to find.

    What I would REALLY like to do is rewrite that script to pick up top level categories and sub categories that lead to the product. But I am nowhere near smart enough to figure that out!

    It is my opinion that I am pointing out a flaw that hurts all Zen Cart owners by hurting chances of climbing search engine ranks. It is a great idea to automate meta tagging and I absolutely love Zen! Just this one issue could use a bit more thought... a rewrite of the script that ONLY scoops up the relevant cat/sub cats (bread crumb).

    That is my two cents!

    Thanks for you help!

  7. #7
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: How to auto generate just product keywords from product page?

    A simpler way to bypass its use would be to define the KEYWORDS constant in your /includes/languages/YOUR_TEMPLATE_NAME/meta_tags.php file. That would prevent the code you quoted from being able to add the categories to it at all.
    If I do this, will ZC subsequently scoop up key words from the actual product description?

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How to auto generate just product keywords from product page?

    Quote Originally Posted by Feznizzle View Post
    A simpler way to bypass its use would be to define the KEYWORDS constant in your /includes/languages/YOUR_TEMPLATE_NAME/meta_tags.php file. That would prevent the code you quoted from being able to add the categories to it at all.
    If I do this, will ZC subsequently scoop up key words from the actual product description?
    Yes, it would. And, this approach is actually safer than deleting the code you quoted earlier.
    If you choose to delete the code, don't delete the "define" statement on the last line that you quoted.

    Either approach will work. I'd lean towards putting the define into the language file instead.

    Quote Originally Posted by Feznizzle View Post
    If I delete this passage, will my ZC simply skip the top level categories when it automatically creates meta keywords? Again, I want the automated meta generation... I just want to skip the top level categories.
    Yes, it will skip building data based on any category names.
    .

    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.

  9. #9
    Join Date
    Dec 2008
    Location
    Rimini, Italy, Italy
    Posts
    67
    Plugin Contributions
    0

    Default I wanna try to duplicate breadcrumbs class in another class

    I'm trying to achieve a similar result.
    I wanna try to duplicate breadcrumbs class in another class to output current product, or category, categories branch (removing "Home" that's unuseful for this feature).

    So if I have these categories:

    Code:
    Clothing
         Pants
              Stone Washed
         Jackets
         Shirts
    Equipment
         Lamps
         Ropes
    the categories portion of automated meta tags would be (for example, in product "501 Jeans stone washed"):

    Clothing, Pants, Stone Washed

    and not the standard zen cart:

    Clothing, Equipment

    Now (I have no experience with classes) it seems to me, the new class has to be inserted in some auto_load thing....could you please point me to any documentation about that?

  10. #10
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: How to auto generate just product keywords from product page?

    Either approach will work. I'd lean towards putting the define into the language file instead.
    Could not get it to work!

    I could not find the specified file here:
    /includes/languages/YOUR_TEMPLATE_NAME/meta_tags.php

    But found it here:
    /includes/languages/english/meta_tags.php

    I copied it to here
    /includes/languages/english/YOUR_TEMPLATE_NAME/meta_tags.php

    I then found this code:
    // Custom Keywords
    define('CUSTOM_KEYWORDS', '');

    And changed it to:
    // Custom Keywords
    define('CUSTOM_KEYWORDS', 'random,test,words');

    There was no change whatsoever. What did I do wrong?

    BTW, I also tested it by defining keywords before putting the file into an override folder. Made zero difference.

    I also tried deleting that passage, the route you felt was less safe. When I did that, it killed the categories and grabbed the prod title for keywords. This was slightly better, but, due to grammar errors (words,are,supposed,to,have,commas,between), this is still not exceptable.

    Contemplating disabling keywords entirely. The meta title/description can be manipulated satisfactorily. The SE's can do a good enough job at grabbing keywords, so maybe I should leave it be.

    I found a conversation (one that included you) where this problem was discussed. At the end, apparently a good solution was had but not posted!

    Here is the last page of that conversation, check out post #84:
    http://www.zen-cart.com/forum/showth...t=37195&page=9

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. How to stop auto generating keywords?
    By joecooper in forum General Questions
    Replies: 1
    Last Post: 14 Sep 2011, 12:36 PM
  2. CEON-URI, how to auto generate URLs?
    By rajoo.sharma in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 13 Apr 2011, 08:04 AM
  3. How to display lightbox directly from Product listing? (no product detail page)
    By y2caye in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Jan 2010, 03:38 AM
  4. how do I auto create product page urls?
    By Garyr125 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 7 May 2008, 04:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg