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

swacks

  • Beginner
  • *
  • Posts: 13
hello -

ok - i will try it again , i did in fact load the sql file successfully and also successfully overwrote the files with filezilla.

i am also running joomla 1.5.15 with vm 1.1.4

trying again now

swacks

  • Beginner
  • *
  • Posts: 13
i just tried it again no luck

overwrote all files successfully

uninstalled the sql uninstall file and then re-installed the sql from the install using the files from the zip file on this foreum i.e. autogen_metatags_vm1.1.4_v1.2.zip

are the permission or something that needs to be changed somewhere.

must this be runn in legacy mode or something.

please help - its only a great solution if i can use category and subcategory in titles

thanks

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Hmmm, I really don't have an answer for you. No, NOT LEGACY. No, no permissions! Is EVERYTHING working ok for products? Is it just a category issue? <- UPDATE:I just reread a previous post of yours, so I see not everything is working for products either... hmmm.

I can explain few things... the saving functions happen in the
administrator/components/com_virtuemart/classes/ps_product.php for products
and
administrator/components/com_virtuemart/classes/ps_product_category.php for category

I would look further into these pages to make sure you have copied them from my hack.

You can search for "metadata" in these documents to see where the saving funcitons for the database tables have been added.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Another thing... can you check your database to see if the mid for product_metakeys and category_metakeys is "1". There should only be one entry into each of these tables, and that should be with an mid of "1".

Likewise, are you using a different naming convention other than jos_vm_xxxxx?

swacks

  • Beginner
  • *
  • Posts: 13
bingo !!

both mids were 0 in the dbase - i changed it to 1 and it works great!

thanks forrest !!

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
OK great. I'll have to look into why it did that for you. Glad it's working now tho.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
[UPDATE] 02-05-2010 -> download v1.3
Fixed potential problem of forms/pages not using/saving metakeys config files/database entries
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.

demsey

  • Beginner
  • *
  • Posts: 7
Hi,

Thank you Forrest for the update.

I am still thinking about that first issue with the filter. I prefer to use proper solution instead my hack because it is not perfect so I hope you can sort it out.

Another thing is category name. For example I have a category "Anti Slip Tiles" and as a result of your hack I have got following keywords "anti,slip,tiles,". I think I can get better results in Google if my category name stays as it is "Anti Slip Tiles" and will be displayed as a phrase in my meta keywords.

I know that means we will repeat a couple same keywords but as phrase they have got more power.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Hum, good idea (key phrase of name). That is a simple fix, and I will add that for categories. It won't work well for products, however, because product names can get too lengthy. I will append full category names key phase as the first "keyword", and product names phrase as the last keyword because of length issues.

-F

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
[UPDATE] 02-09-2010 -> download v1.4
Added support to PREpend category name PHRASE and/or parent category name PHRASE to category keywords. A global param, configurable in admin category add/edit.
Added support 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.

Download from first post of this topic or here: http://forum.virtuemart.net/index.php?action=dlattach;topic=65697.0;attach=13785

simple79

  • Beginner
  • *
  • Posts: 4
Thanks for the Hack Forrest.

I'm a slight challenge saving changes. When the product category admin, any changes I make whether global or not are not saved to the db.

DB scripts have been run in and all modded files updated.

Anyone else had a similar scenario?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Have you tried products? Are you able to save them ok? What version did you download?

Two things to check.
1. database table jos_category_metakeys which holds the global category data.
2. ps_product_category (which saves the added/edited products).

Previous issues:
1. the jos_category_metakeys "mid" entry is not "1". If not 1, set to 1.
2. if you manually added the hacks to your files (not over-writing, but rather inserting code manually) make sure you double check ps_product_category that you did it right.

arepie

  • Beginner
  • *
  • Posts: 4
Hie,

Thanks for the hack. Im not sure this is ethical or not, but, i have edit some codes to make it more user friendly. I added a "tab" called "MetaData" to all pages that apply to this hack. I know this is not much, but it makes people feel much more comfortable while using VM like they usually do, and this is my way showing my gratitude and my contribution to this good hack.

Only can be use with:-
  • Autogen Metatags v1.4
  • Joomla Version 1.5.15
  • VirtueMart 1.1.4

This will apply to:-
  • new product page
  • edit product page
  • new category page
  • edit category page

And only infected 2 files:-
  • product.product_category_form.php
  • product.product_form.php

HOW TO (Will be added automaticaly with Autogen Metatags v1.5 and above)
  • Update the hack "Autogen Metatags v1.4"
  • Then update the hack with my files
  • Finish

Example:-


You can get the files from this attachment.

[attachment cleanup by admin]

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Hie,

Thanks for the hack. Im not sure this is ethical or not, but, i have edit some codes to make it more user friendly. I added a "tab" called "MetaData" to all pages that apply to this hack. I know this is not much, but it makes people feel much more comfortable while using VM like they usually do, and this is my way showing my gratitude and my contribution to this good hack.

Only can be use with:-
  • Autogen Metatags v1.4
  • Joomla Version 1.5.15
  • VirtueMart 1.1.4

This will apply to:-
  • new product page
  • edit product page
  • new category page
  • edit category page

And only infected 2 files:-
  • product.product_category_form.php
  • product.product_form.php

HOW TO
  • Update the hack "Autogen Metatags v1.4"
  • Then update the hack with my files
  • Finish

Very nicely done! :) A fitting complement to an already great hack, thank you for sharing that with us arepie. :)

And Forrester, thanks for this Auto-Generate Meta mod. Until your mod, VM 1.1.x didn't have any native metadata entry for categories and products, and some would argue it's an important feature to have for decent SEO.

The weird thing is that VM did at some point have native metadata entry for categories and products. They introduced it in VM 1.2.0 alpha (which I have a copy of and can attach here for you guys to install and check out, but only if it's okay with the management). There is a Metadata Information fieldset on both product and category entry pages, similar to Joomla's native setup and offering "Description", "Keywords", "Robots" and "Author" fields. On the front end, all the metadata will show up in the header as expected.

Perhaps in addition to this hack, we could get the 1.2.0 code ported to 1.1.4 to offer those who want that kind of control of their metadata, and get a few other neat features back (such as smooth Accordion admin menu, Order By "Best Selling" option, among others) from a version that didn't see light for long... :)

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Arepie, thanks for the tab addition. I have included it for the next release v1.5.

Klutzon, I have played with VM1.2, and yes I see they have brought back basic controls of metadata as you mention. I am working right now for this hack to also be available for VM1.2, as by default, they still don't auto-generate. Perhaps it can be included in the stable release of VM1.2 if I get it to them fast enough.