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

misholini

  • Beginner
  • *
  • Posts: 29
  • VirtueMart Version: 3.2.14
Try this plugin:
http://en.tinkeltools.de/sef-links-for-virtuemart-with-vmsef.html

or
http://www.joomlaplugins.net/joomla-extension-download/cat_view/34-virtuemart-specific-extension.html
Thanks for the great hack!
Just a question here, is it possible to achieve the meta tags functionality on the VM home page as well?
I use vmsef and joomla SEF and wish not to use any othe SEF extension.
It would be great if this hack can cover the VM Shop page as well.

The Girl from Ipanema

  • Beginner
  • *
  • Posts: 15
Hello,

Thank you for this hack. At first I was really afraid and hesitated to use it. But it is so simple and there is nothing to be afraid of if you backup ur website and database.

reinaldo83

  • Beginner
  • *
  • Posts: 2
Hello!

I need some help please. I have a weird issue. I can see Meta Abstract, Keywords, Author, Languages, etc.. but my website doesn't show meta title or meta description and i don't know why.

It's not about the template because i have installed a copy of my original website in another domain including databases and some components and this hack works perfectly right there, but not in my original website.

I have unistalled the hack, i removed the 5 columns located in _products and the others 2 tables, I replaced back the original files and then i made the process again, i mean, a re-installation, but the problem is still going on. The website can show any Meta Tag, except title and description. Actually title tag appears but is empty, it shows something like this <title></title> but meta description doesn't appear.

I have to say that before this, i had a Global Meta Description set up at Joomla Global Configuration site, i deactivated it and Meta description is gone, but if i set the meta description again up, it will be showed again in my site.

The point is, no matter what i do at Global Configuration or at the Virtuemart Meta hack section it doesn't show the Meta Description set up at VirtueMart's products, but no matter what i do at Global configuration or at Virtuemart Meta hack section it can show any other meta tag set up by the hack.

I think the most important tags are title, description and keywords, but i can't see title or description. That's why i say it's a weird problem. Can you help me please.

Thanks in advance and sorry for my english, i know it's not very good since my natal language is spanish.

Reinaldo.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
@misholini: Sry, this will not work for the homepage of a VM store. That requires a separate file to be hacked. I mean it's possible, but I haven't done it. Maybe in the future.


@reinaldo83: Sounds like maybe you have a Joomla SEO/SEF component that is overwriting the data from my hack. Check that component... turn it off or uninstall it (if you do  have one installed) and see if that helps.


As for the other posts here as of late... thanks for your support and compliments. As for language issues.. I know it is an issue... and I haven't had the time to solve it! Sry. Likely its a part in the bad word filter process or keyword sorting that has some issue.

reinaldo83

  • Beginner
  • *
  • Posts: 2
Hi Forrest!

Thanks for your tip and your hack. Before i wrote the first time i turned some components and plugins off because i was thinking that was the problem too, but i didn't it with all of them. Now, you gave the same tip and i did it again with each component i have installed.

Actually, what i did was to install each component at the domain i have as a copy of my site just for testing.

After i installed a component that i already had at my original site i was testing if something wrong happened until i got the component shocking with your AutoGen Hack.

Firstly, i uninstalled that component, but after that, i prefered to reinstall it back again and try to check the code to solve the problem and, i have just done, i did it. I solved the problem and i just wanted to thank you for the tip again and for the hack.

I solved the problem by recoding the file /libraries/joomla/document/html/renderer/head.php which was one of the files replaced by the component i previously had.

The component i had before was about setting metatags up, basically the same metatags as yours but it works for the front page, articles, joomla menu and those things. So now, i have metatags completely set up on my website, front page, articles, VM products, VM categories, and all of them personalized for each page thanks to these 2 fantastic tools.

I spent 48 to 72 hours trying to solve this. :s

Thanks...

Reinaldo.

mark111

  • Beginner
  • *
  • Posts: 1
Good afternoon, everyone. Prompt as with the aid of this hack you've done that in the address bar of the site are given human-understandable links instead of dynamic? After installing the hack I have meta tags have earned excellent, but the link remained kind http://20897.domrybak.web13.hosting-test.net/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=8&category_id = 2 & option = com_virtuemart & Itemid = 53


Please, tell a beginner ... Thanks in advance

mookite

  • Beginner
  • *
  • Posts: 2
Forest, et all, a great hack, well done. :)

If like me you already have a number of products already in your system.  These SQL scripts will populate the product_metadesc,product_abstract and product_title for you.  Saves having to go through each product in turn and save or update it.

Code: [Select]
update jos_vm_product set product_metadesc = CONCAT(product_title," - ",product_s_desc);
update jos_vm_product set product_title = product_name;
update jos_vm_product set product_abstract = product_metadesc;

I couldn't manage to come up with a script to populate the product_metakey column, SQL is not my strong point, any help would be appreciated.

I also use another great plugin, include_content_item for all of my cart short and full descriptions.  This works fine with VM but the meta data was not processing the {include_content_item } tag.

To fix this a added a few lines in: shop.product_details.php, adding vmCommonHTML::ParseContentByPlugins wherever it was reading the product_metadesc


Code: line 328 replace with the following:

Code: [Select]
// Set Description Metatag
if (($db_product->f("product_metadesc") != "") && ($turn_on_edit == "Y")) {
if ($append_category == "Y") {
if ($general_append_end != "") {
$document->setMetaData('description', str_replace('"', '', strip_tags(vmCommonHTML::ParseContentByPlugins($db_product->f("product_metadesc")).' - '.$get_category.' - '.$general_append_end)));
} else {
$document->setMetaData('description', str_replace('"', '', strip_tags(vmCommonHTML::ParseContentByPlugins($db_product->f("product_metadesc")).' - '.$get_category)));
}
} else {
if ($general_append_end != "") {
$document->setMetaData('description', str_replace('"', '', strip_tags(vmCommonHTML::ParseContentByPlugins($db_product->f("product_metadesc")).' - '.$general_append_end)));
} else {
$document->setMetaData('description', str_replace('"', '', strip_tags(vmCommonHTML::ParseContentByPlugins($db_product->f("product_metadesc")))));
}
}
} else {
if ($append_category == "Y") {
if ($general_append_end != "") {
$document->setMetaData('description', str_replace('"', '', strip_tags($db_product->f("product_name").' - '.$get_category.' - '.vmCommonHTML::ParseContentByPlugins($db_product->f("product_s_desc")).' - '.$general_append_end)));
} else {
$document->setMetaData('description', str_replace('"', '', strip_tags($db_product->f("product_name").' - '.$get_category.' - '.vmCommonHTML::ParseContentByPlugins($db_product->f("product_s_desc")))));
}
} else {
if ($general_append_end != "") {
$document->setMetaData('description', str_replace('"', '', strip_tags($db_product->f("product_name").' - '.vmCommonHTML::ParseContentByPlugins($db_product->f("product_s_desc")).' - '.$general_append_end)));
} else {
$document->setMetaData('description', str_replace('"', '', strip_tags($db_product->f("product_name").' - '.vmCommonHTML::ParseContentByPlugins($db_product->f("product_s_desc")))));
}
}
}

// Add and Set Abstract Metatag?
if ($add_abstract == "Y") {
if ($turn_on_edit == "Y") {
$name = "abstract";
$content = strip_tags(vmCommonHTML::ParseContentByPlugins($db_product->f("product_abstract")));
$document->setMetaData($name, $content);
} else {
$name = "abstract";
$content = str_replace('"', '', strip_tags($db_product->f("product_name").' - '.vmCommonHTML::ParseContentByPlugins($db_product->f("product_s_desc"))));
$document->setMetaData($name, $content);
}
}

IntraX

  • Jr. Member
  • **
  • Posts: 87
We had a large number of products and never had to go through any product manually, when you turn on the setting "global" in any of the products admin page, the function is turned on for all products. No need for this hack :)

Blakharaz

  • Beginner
  • *
  • Posts: 9
I only would like to know if someone already has installed VM 1.1.6 and could tell me if it works well with the hack.

angi79

  • Beginner
  • *
  • Posts: 12
Thank you for this "grande" hack.
I have joomla 1.5 and VM 1.4., with the router.php for joomla sef, but the sef not working.
The sef is attach.

kortaben

  • Beginner
  • *
  • Posts: 3
Hi.
I'm having some problem with the meta title and meta description not being fetched by your hack when I try to do it manually. It fetches the title and description from the category title and description field, not from your hack.
The keywords tag work perfectly as does the e.g. Author tag if I decide to tick that.

Link:
http://www.stalprodukter.se/index.php?option=com_virtuemart&page=shop.browse&category_id=25&Itemid=81

I'm running VM 1.1.3 with Joomla 1.5

Regards Marcus

rrmdp

  • Beginner
  • *
  • Posts: 6
is possible to install with VM 1.1.6 ??

uniqbuy

  • Beginner
  • *
  • Posts: 23
Hi

Has anyone tried to run this with Joomla! 1.5.22 and VM 1.1.6. 

I have tried it and all the meta fields are showing but the meta information is not updating. 

My database prefix is not jos so I changed this in the sql file before running and I also did not copy the files straight over, I used winmerge and only updated those sections relating to the hack.

Thanks

uniqbuy

  • Beginner
  • *
  • Posts: 23
Update to my last post:
It actually does work with VM 1.1.6 but I can't get manual edit to work - it will not save the setting when I apply it. 

Does anyone know how to change it in the code so it is automatically set to manual edit - the automatic option puts in too much unnecessary stuff.

Thanks again

johnwayne

  • Beginner
  • *
  • Posts: 5
are the dl links down?