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

mizamba

  • Beginner
  • *
  • Posts: 3
This is code in my relatedProducts.tpl.php

<table width="100%" align="center">
   <tr>
    <?php
    while( $products->next_record() ) { ?>

         <td valign="top">

            <?php echo $ps_product->product_related( $products->f('product_sku') ) ?>

         </td>
   <?php
    }
   ?>
    </tr>
</table>

and ps_product not change ....

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
mizamba, I understand that your relatedProducts.tpl.php is calling this out, but I am telling you also this is not the updated version.

Regardless, since you have a different ps_product.php than the one this hack is made for, you can do a manual install of the hack if you wish.

You will need to go inside each document, and copy the hack code (commented meta) and paste it into your original documents.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
You can verify that what I say is correct. Look at the version of ps_produt.php you are using and the version I have provided. You will notice that there is a date difference (date / version found at top of document).

nirajlama

  • Beginner
  • *
  • Posts: 31

This is typical of Google. I have over 1500 links, with only 250 indexed so far. It will take time, and that is all there is to it.

This hack doesn't create the other results, but you can modify and add results if you wish by editing:

libraries/joomla/document/document.php (for "generator")

and

libraries/joomla/document/html/renderer/head.php (for more metadata fields)

I have attached the edited (head.php) for rugged, to which you can use to replace their info with yours.

Hey Forrest!
Thanks for your generous input.
I guess with Google I just have to have exercise patience - a rare, but welcome opportunity.
Cheers!

MattCruz

  • Beginner
  • *
  • Posts: 1
  • Merchant of Venice CA
Hi Forrest,

I've installed your Autogen Metadata hack in a VM 1.1.4 localhost catalog-only dev environment with 10K products. 2 things I noticed:

 1. On product browse paging (with 10-product display set), going to the next page took from 5-10 seconds (in DEBUG mode) although uninstalling the hack then doing the same took just .1 second!
 2. The metakeys tables (both product and category) were not auto-populated if I did not open the product in VM. What triggers the auto-populating of metakeys?

Thanks a lot for a great hack. Hopefully, you could help me sort this out.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
As for speed, since you have the metadata currently auto-generating data on the fly, and you probably have tons of product in one category, it might take a few seconds more.

Category metadata is not based on just what is shown one one page, its based on category description, parent category info, and ALL products within that category (not just what is currently shown). So it's takes into account names of all products in that category, which if you have 100s of them, I can see how this might slow things down a bit.

You shouldn't have this problem for products, as it only takes into account that product, and the assigned category name/description.

To alleviate the category problem, you will want to turn on the "Turn On Manual Edit of Meta Title/Description/Keywords (Global)" setting.

When you do this, instead of generating Title, Description, and Keywords on the fly on the front end, it will refer to the database entry for metadata for that category. But in order to have a database entry for category metadata, you must enter each category via VM admin, and edit/save what is auto-generated there. Now instead of dynamically creating metadata keywords (most intensive process) on the fly as visitors go to your category, the info will be pulled from the database, greatly reducing the processing.

So, if you have follow that.
1. DO NOT TURN ON for products:
Turn On Manual Edit of Meta Title/Description/Keywords (Global)
unless you want to edit (title, description, keywords) for each product. 10,000 products... that is a lot of time.

2. TURN ON for categories:
Turn On Manual Edit of Meta Title/Description/Keywords (Global)
and enter each category in VM admin, then save it. This will save the dynamic info into database, so not having to do this when user visits site front end.

3. The other global settings you can use a s you please... they should not make much difference at all in terms of speed (appending, pre-pending options)

nirajlama

  • Beginner
  • *
  • Posts: 31
Hi Forrest,
Now that Google has begun indexing my new Sitemap (the results are good), I am having another problem. A whole lot of 404s.
Instead of redirecting each and every page using .htaccess, I was wondering if I used Artio JoomSef which has an easier form for doing the redirects.
I would be thankful if you had some advice. I have a feeling that I am staring into bottomless abyss!
Thank you for your patience with us obtuse kinds. 

orasis

  • Beginner
  • *
  • Posts: 39
Hi Forrest,
Now that Google has begun indexing my new Sitemap (the results are good), I am having another problem. A whole lot of 404s.
Instead of redirecting each and every page using .htaccess, I was wondering if I used Artio JoomSef which has an easier form for doing the redirects.
I would be thankful if you had some advice. I have a feeling that I am staring into bottomless abyss!
Thank you for your patience with us obtuse kinds. 

Hi, why do you relate the redirects and 404s to this plugin ? I didn't get it, did you reinstall all virtuemart or recreated (deleted etc) your products, and the old indexed ones from google results point to a 404 error ??

nirajlama

  • Beginner
  • *
  • Posts: 31
I am sorry. The other day I had discussed a bit with Forrest about how Google was "reindexing" because I had resubmitted by Sitemap after the installing the hack.
The problem is also after this procedure I activated SEF for the first time using router.php, as recommended by Forrest. I overlooked the redirect problem. Now I am looking for some solution.
Do you think I could use the Joomsef?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
I use a nifty little Joomla plugin to direct old URLS to new URLS called:
JRedirect

Be sure you read the instructions and use correctly! No spaces (or returns) on last redirect URL param.

cliffordsfleas

  • Beginner
  • *
  • Posts: 3
This is brilliant. Thanks for putting this together. :)
A priest, a nun, an Irishman, a Scotsman, a cowboy, a lawyer, a salesman, and a blonde all walk in to a bar. The bartender says, "Hey, is this some kind of joke?"

nuller-joe

  • Beginner
  • *
  • Posts: 46
Hm, for some reason it doesnt autofill mnta keywords. I dont know why?, any known bugs?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
No bugs now that I know of. This release has been out for a bit now.

There are two ways keywords are generated. From the VM admin edit product, or from the front end product details page.

Where are you checking to see keywords (or lack thereof)?

nuller-joe

  • Beginner
  • *
  • Posts: 46
Both in the VB admin, and frontend

orasis

  • Beginner
  • *
  • Posts: 39
Do you think I could use the Joomsef?

I do, but it looks like it is going commercial soon although it is not very user friendly and has problems as all SEF plugins.