Author Topic: HACK: AutoGen Metadata Metatag. Product, Category. Title, Description, Keywords  (Read 243879 times)

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
Hello VM fans,


I have created a Metadata HACK for VM (tested 1.1.4 w/ J1.5). If you want better seo value, and/or have lots of products, you will NEED THIS for automatic and unique metadata / metatag generation of meta title, meta description,  meta keywords, and starting from v1.7, supports most all other metatags including CANONICAL![/b]

1. This hack will auto-generate a better Title, Meta Description, Meta Keywords set, Meta Abstract, and Meta Subject, UNIQUE to each product and category. Likewise, you can now add the Meta Canonical Tag, unique to each product and category. Also supports adding tags like:
  • Overwrite Joomla Meta Generator Tag
  • Meta Classification
  • Meta Author
  • Meta Organization
  • Meta Copyright
  • Meta Country
  • Meta Content-Language
  • Meta Language
  • Meta Designer
  • Meta Comments
  • Meta No-Email-Collection

2. You can let it automatically run it's course and generate this info dynamically, or you can use the dynamic output to build a base then edit the output for each product and/or category.

3. Instructions are included on the VM admin add/edit product page (first tab), or the add/edit category page (first tab).
4. This is a hack, so you will need to modify or replace 6 files:
administrator/components/com_virtuemart/html/product.product_category_form.php
administrator/components/com_virtuemart/html/product.product_form.php
administrator/components/com_virtuemart/html/shop.browse.php
administrator/components/com_virtuemart/html/shop.product_details.php
administrator/components/com_virtuemart/classes/ps_product.php
administrator/components/com_virtuemart/classes/ps_product_category.php

5. You will need to run the metadata_hack.sql included as well. This:
Adds five new columns (fields) to jos_vm_product
Adds five new columns (fields) to jos_vm_category
Adds new table jos_vm_product_metakeys
Adds new table jos_vm_category_metakeys

Note: If you did not use the "jos" naming convention on your database, please update this before running the script.

6.Comes with an sql to uninstall hack database changes. Comes with files to overwrite hack files should you want to remove.



NOW FOR THE BEEF BEHIND THE HACK:

A. If you have a store running and install this hack, you don't have to do a thing if you so wish. You will see the changes are instant on live site, and you will have, UNIQUE TO EACH PRODUCT AND CATEGORY, extremely relevant, accurate, complete, and better arranged TITLE, META DESCRIPTION, META KEYWORDS, META ABSTRACT, META SUBJECT.

B. 2 are two global settings groups. 1, global settings for products. 2, global settings for categories. You can access the global settings for each type respectively from any product or category VM admin add/edit page. Global settings include: Global appends to title, description and keywords; badwords; turn manual edit on/off; number of keywords to generate; etc.

C. If you want to get even more hands on then what the system does automatically, then you can turn on the global manual edit param, which allows you to view and edit the dynamically created tags individually, make global appends, etc. In other words, the system will generate a great base for you to work off of, rather than starting from scratch for each product/category. Most likely, you won't even need to use this feature. If you do, let me know what you needed it for so I can make it better.

D. The system comes with a word filter (like a bad word filter) so you can exclude words you know you do not want in your keywords (like, the, of, for, if). I have included a fairly extensive set already.

E. I won't get much more detailed here as to how the system generates the tags, but you can read more within each add/edit category/product page where my instructions reside. The system does use a systematic culmination of product name, category name, product short and full description, category description, parent category, child products, and whatever global or manual overrides you may make. Important to note: the more you have completed above listed fields, the better your auto- populate and append will perform.

Screenshot of admin panel metadata tab:


HAVE FUN! RELIEVE SOME SEO STRESS AND BE VISIBLE!

PLEASE:
1. Report any bugs here.
2. Request additional features here.
3. Give comments of any kind... I would like your feedback.

-F

Note: using vm1.1.3 see post #32 by joenist99. Or, for pre vm1.1.4 versions, you should keep your original files and add my code within each file to the appropriate locations. All added code is commented (search for METADATA).
http://forum.virtuemart.net/index.php?topic=65697.msg219413#msg219413

Note: If your config file is not saving in product and category metaforms please check the solution here (post #49 by me). Fixed in v1.3: http://forum.virtuemart.net/index.php?topic=65697.msg220321#msg220321

Note: For those using sh404SEF, or a similar SEF which tries to attempt metadata support, you will need to turn off the metadata aspect of it, since this hack injects metadata changes before other components will (like sh4040SEF), hence being overwritten. See this:
http://forum.virtuemart.net/index.php?topic=65697.msg224641#msg224641

Note: If your using CSVI and already have a metadata set you want to use as well, check out this post by Jimvertical. http://forum.virtuemart.net/index.php?topic=65697.msg229786#msg229786


Note: If your using Joomfish Multilanguage, check out this post by ningpa.
http://forum.virtuemart.net/index.php?topic=65697.msg238624#msg238624


[UPDATE] 01-30-2010 -> download v1.2

[UPDATE] 02-05-2010 -> download v1.3
  • Fixed potential problem of forms/pages not using/saving metakeys config files/database entries. See post for more info: http://forum.virtuemart.net/index.php?topic=65697.msg220321#msg220321
  • Added support for appending key PHRASES
  • Added 2nd field to separate appending title and description. Now title has it's own append, as does description.
  • Files modified: All files, including sql, modified.

[UPDATE] 02-09-2010 -> download v1.4
  • Added option to PREpend category name PHRASE and/or parent category name PHRASE to category keywords. A global param, configurable in admin category add/edit.
  • Added option to append product name PHRASE and/or parent category name PHRASE to product keywords. A global param, configurable in admin product add/edit.
  • Files modified: All files, including sql, modified.

[UPDATE] 02-20-2010 -> download TabMetaData.zip

[UPDATE] 03-02-2010 -> download v1.5
  • Fixed extra dash "-" after categories with no parent categories
  • Added TabMetaData so all Metadata is controlled in single tab
  • Now have option to include SUB-category names in Title and/or Description of parent categories.
  • Added additional keyword support for categories, to include names of subcategories in keyword generation of parent categories.
  • Files modified:
    • metadata_hack.sql
    • ps_product_category.php
    • shop.browse.php
    • product.product_category_form.php
    • product.product_form.php

[UPDATE] 04-04-2010 -> download v1.6
  • Fix: Minor update in commenting of hacked code (metatab name). Not necesary to download if you already have v1.5 working.
  • Files modified: product.product_form.php

[UPDATE] 04-08-2010 -> download v1.7
  • Minor fix in redundant $document calls
  • Added support to define Canonical URL Metatags for all category and products
  • Added support for Unique Abstract and Subject Meta Tags
  • Added support to overwrite default Joomla Meta Generator tag
  • Added support to for Metatags like: Classification, Author, Organization, Copyright, Country, Content-Language,  Language, Designer, Comments, No-Email-Collection
  • Files modified: all files modified.
  • If you already have this hack installed, there is an additional .sql for updating database to current version. Just use the .sql update and overwrite all files, as they have all changed.


[UPDATE] 10-15-2010 -> download vm1.1.5 v1.7

[UPDATE] 09-22-2011 -> download vm1.1.4 v1.7_multi


Please take a minute of time to leave a review here: http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=328&Itemid=

If you like or found useful, please donate at http://www.paypal.com to forrestchamberlain@hotmail.com

[attachment cleanup by admin]

flash244

  • Beginner
  • *
  • Posts: 5
Hi Forrest,

I cant believe that VM does not have a default metatags. I tryed your hack and WOW, meta keywords and metadescriptions come out!

Thanks man, for such a good hack!

Best regards!

detlilto

  • Beginner
  • *
  • Posts: 11
Hi,
it is realy good idea.
How can I see how it works?

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
***UPDATE**** RuggedRadios is no longer in my control. They have moved to Zencart!?


Visit ruggedradios.com. I am still working on filling out the category descriptions and better product short and full descriptions.

If you find a product on the site that has a good product description and short description, you can see what the system automatically generated by viewing source:

Here is a good example:
http://www.ruggedradios.com/race-racing-communications-store/details/619/82/intercoms/jeep/browse-by-product/4-watt-vhf-car-to-car-radio-kit.html

Just view the source to see what my system generated for TITLE, META DESCRIPTION, and META KEYWORDS

Again, if you don't like what the system generates on its own, then you can manually edit/override the pre-generated title, meta desc, and meta keys on the category or product add/edit pages.

In this example I have also enabled the "append to end title" and so it adds to every product title:
rugged. radios Communications Products

Likewise, I have enabled "append to end keywords", so the system appends to all product keywords:
product, products, buy, top, best, value, store, shop, new, used

You can specify/change what you want to append to end as keywords or meta title/description. Both products and categories have this append function, and are separate, meaning you can specify a different append of keywords for categories vs appended of keywords for products.

detlilto

  • Beginner
  • *
  • Posts: 11
I see all in yours source, it looks very nice. In my source i don't see anything. I see only configuration hack panel in product backend.

Here is my product example:
http://www.szpejarnia.pl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=1131&option=com_virtuemart

I don't know why nothing has in the source.
Do You have any suggestions?
 

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
I see that the TITLE and Description is working great.

I see that your keywords are working partly... that it is pulling words from your product name and category description just fine.

However, it does seem like the keywords is not working in terms of pulling them from your short and full product description.

Anyone else experiencing this? I'm wondering if it's a language issue. I'll look into this further.

1. Please make sure you do not have the "Edit Override" box checked for title/keywords/description of products.

2. Clean your Joomla cache if it is on.

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
I tested with your language on my site and did not see a problem... keywords came right up. I am assuming you have the "Edit Override" checked... and then added your short and full description when adding the product.

If you do have the "Edit override" checked, just clear the meta keywords box to have it generate a new set from your current description and short description.

detlilto

  • Beginner
  • *
  • Posts: 11
I have turn on:

1. Turn On Manual Edit of Meta Title/Description/Keywords (Global)
2. Append Category Name to Title and Description Metatag

I don't now what is "Edit override".
   
   

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
please turn off edit over-ride

detlilto

  • Beginner
  • *
  • Posts: 11
Aha you mean: Turn On Manual Edit of Meta Title/Description/Keywords (Global)


Now is off, but still I don't see keywords in source.

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
looks perfect to me!~

  <meta name="keywords" content="grifone, latok, gore, tex, performance, shell, kurtka, bardzo, wytrzyma, zamkami, ytkowana, yciem, wykonana, wszechstronnie, swojemu, oddychaj, nadaje, membrany, materia, lekka, kszta, doskonale, dobrych, ciach, zintegrowany, zamek, ytkowania, wysoko, wysokiej, wysok, wspinaczki, wilgotno, wentylacja, trzne, gore-tex" />
  <meta name="description" content="GRIFONE Latok - GORE-TEX PERFORMANCE SHELL - Lekka i bardzo wytrzymała kurtka, wykonana z  użyciem membrany Gore-Tex Performance Shell o dobrych właściwościach oddychających. Kurtka, dzięki swojemu kształtowi i  wytrzymałości może być użytkowana bardzo wszechstronnie. Doskonale nadaje się jako techn" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />

detlilto

  • Beginner
  • *
  • Posts: 11
I don't know how it is possible, because I see only:

<meta name="robots" content="index, follow" /><meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer
not sure, but I can tell you it's working as it should. This hack is only for categories and products, and looking at your pages, and the link you sent, it looks great!

I am assuming your browser is caching, so not fetching the updated data. Try cleaning your browser cache or try another browser... I recommend Google Chrome

detlilto

  • Beginner
  • *
  • Posts: 11
I don't understand, after installing chrome, I still see only:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl-pl" lang="pl-pl"><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><script src="http://1.2.3.4/bmi-int-js/bmi.js" language="javascript"></script><meta name="robots" content="index, follow" /><meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />


it is irritating ;/

Forrest

  • Hero Member
  • *****
  • Posts: 1972
  • Me and my baby
    • Web Developer