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

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
@spottedsparrow: Yes, if you update the description, and the
"Turn On Manual Edit of Meta Title/Description/Keywords/Abstract (Global)"
option is unchecked / off, then it will update on it's own.

If
"Turn On Manual Edit of Meta Title/Description/Keywords/Abstract (Global)"
is checked / on, then it always pulls from that admin form field. If you want the override to re-generate/re-populate the data in the admin form field, then you have to clear the field desired to re-generate and then save the form. Upon re-entry of the product admin form, the data will repopulate. Again, this is only for if you are using the override (checked) option.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
@tax: see ningpa's previous post.

@ningpa: Thanks for the update. A good solution till get it to work with joomfish.

tax

  • Beginner
  • *
  • Posts: 5
i managed to make this work.

first you i got currently active language with:
Code: [Select]
$lg = &JFactory::getLanguage();
$language = $lg->getBackwardLang();

and then i just made if statement:

if( $language != 'your_default_language' ) {
 // default vm code goes here
}
else {
 // hack code goes here
}

@ningpa, where (in which file) do this hack?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
shop.broswe.php

and

shop.product_details.php

(find my code (hack))

tax

  • Beginner
  • *
  • Posts: 5
please, help me correctly modify files. When I make changes, metakeys taken from the default joomla settings

ningpa

  • Beginner
  • *
  • Posts: 5
i was really busy when i was writing previous post and totally forgot to point out in which files you need to make this update:
Code: [Select]
administrator/components/com_virtuemart/html/shop.broswe.php
administrator/components/com_virtuemart/html/shop.product_details.php

i attached modified files.
you need to substitute 'serbian_lat' in
Code: [Select]
if( $language != 'serbian_lat' )statement with your default language.

(i think i made some changes with the rest of the code so dont just copy/paste entire files)



forest, thanks again


[attachment cleanup by admin]

allan.backhouse

  • Beginner
  • *
  • Posts: 10
    • ROI Media
Hi Forrest,

Thanks so much for an awesome hack. It was a little difficult at forst but I managed to get it working in the end.

The only problem I am currently experiencing is that the description tags in my products pages dont automatically populate.

Could you possible please take a look at this website http://mycamera.co.za/sony-alpha-330-dslr-camera-twin-lens-kit.html and point me in the direction?

I am using
VirtueMart 1.1.3
Joomla 1.5.13 Stable &
autogen_metatags_vm1.1.4_v1.7

Thanks,

Charles

allan.backhouse

  • Beginner
  • *
  • Posts: 10
    • ROI Media
Hi, Please can anyone help with the below?
I am needing help desperately.

Thanks,
Charles

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Did you check the manual override of the metadata? If so, this will not automatically populate on front-end? If you want it to populate on the admin, clear the description (make sure no spaces), then save, and re-enter product admin and save again.

allan.backhouse

  • Beginner
  • *
  • Posts: 10
    • ROI Media
Did you check the manual override of the metadata? If so, this will not automatically populate on front-end? If you want it to populate on the admin, clear the description (make sure no spaces), then save, and re-enter product admin and save again.

Hi Forrest, I have cleared both the Product Description fields and Meta Description fields, and left the Manual Override unchecked since I installed this, and it is still not updating. Any other ideas what may the problem be?

Regards,

Charles

allan.backhouse

  • Beginner
  • *
  • Posts: 10
    • ROI Media
Hi Forrest,

I just found out that it is because I dont have any Short Descriptions, I only populated the Product Description fields. Could you please send me the code or work-around so that the meta-description pulls from the Product Description field and not from the Short Decription field?
Or please tell me in which files and what lines I need to edit and I can implement.

Many thanks for an awesome product so far.

Thanks,

Charles

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
You'll need to change the files (html folder files), and specifically where in my hack calls out for "product_s_desc", and instead change all calls to the "product_desc".

zazu

  • Jr. Member
  • **
  • Posts: 59
I have been using the hack for some time and think its great. I have some long category names often with commas and product names with colons and the urls get represented like the following:

http://www.goodwins.co.nz/shop/details/3694/1675/earth-sciences,-geography,-environment,-planning/earth-sciences/geology-&-the-lithosphere/the-hidden-landscape--a-journey-into-the-geological-past.html

The commas are retained in the url and the colon is changed to a dash, hence the double dash in the url

I am not sure whether this is a good thing for Google and if not how can I remove the commas and avoid the double dash

FYI the category names are based on international standard of book classification

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
I think your misunderstanding what is generating that URL. This hack doesn't generate SEF URLS... It does SEO (metatags: title, description, keywords, etc). You must be using an SEF component/mod/plugin to generate the SEF URLS, in whcih case that is where you want to check.

zazu

  • Jr. Member
  • **
  • Posts: 59
Sorry about that - the issue is with router.php