VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: sodego on January 15, 2012, 19:04:15 PM

Title: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: sodego on January 15, 2012, 19:04:15 PM
Does Virtuemart2 support any meta Keywords or Meta Description ?
If so. How can I turn it on?
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: Milbo on January 15, 2012, 19:32:09 PM
of course, read the feature list, should be listed there,.. there is nothing to turn it on, it is always activated
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: sodego on January 15, 2012, 19:58:00 PM
Sorry for my mistake I wanted to know if VM2 can AutoGen Metadata Description and Keywords like in this topic
http://forum.virtuemart.net/index.php?topic=65697.450 (http://forum.virtuemart.net/index.php?topic=65697.450)
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: Milbo on January 15, 2012, 20:10:07 PM
No, maybe as extra component.
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: sirius on January 26, 2012, 17:13:54 PM
Hi, I can confirm that no meta description nor meta keyword is present on our product detail page, with VM2.0

Despite of description and resume (short description) on them.
(joomla 2.5)
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: PRO on January 26, 2012, 20:21:18 PM
there is a meta description field,

see picture attached.

To auto generate
views/productdetails/view.html.php

if ($product->metadesc) {
         $document->setDescription( $product->metadesc);
      }



if ($product->metadesc) {
         $document->setDescription( $product->product_s_desc .$product->metadesc .$category->category_name);
      }

that sets it to short description + meta description + category name

^^^ that can also be expanded using many other variables.

[attachment cleanup by admin]
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: sirius on February 01, 2012, 10:36:33 AM
Hi thanks

so perhaps an "autogenerate meta desc" checkbox could be ok somewhere , and with short desc if checkbox is yes ?

Simply like:

if ($product->product_s_desc && $autogen ='1' ) {

$document->setDescription( $product->product_s_desc );

} elseif ($product->metadesc) {

$document->setDescription( $product->metadesc );

  }
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: riga75 on January 16, 2013, 10:11:41 AM
I have the problem that does not display the meta description in the home of virutemart (which is the home of the site), where I'm going to set it?
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: jjk on January 16, 2013, 10:42:42 AM
Quote from: riga75 on January 16, 2013, 10:11:41 AM
I have the problem that does not display the meta description in the home of virutemart (which is the home of the site), where I'm going to set it?
There is no meta description in VM for the shop overview (categories view). Use individual meta descriptions in your category and product views instead, which is much better for SEO.
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: riga75 on January 16, 2013, 10:52:39 AM
Quote from: jjk on January 16, 2013, 10:42:42 AM
Quote from: riga75 on January 16, 2013, 10:11:41 AM
I have the problem that does not display the meta description in the home of virutemart (which is the home of the site), where I'm going to set it?
There is no meta description in VM for the shop overview (categories view). Use individual meta descriptions in your category and product views instead, which is much better for SEO.
For the products and for the category no problem, but for the home as I do?
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: zainabubu on June 03, 2014, 09:09:44 AM
Quote from: sirius on February 01, 2012, 10:36:33 AM
Hi thanks

so perhaps an "autogenerate meta desc" checkbox could be ok somewhere , and with short desc if checkbox is yes ?

Simply like:

if ($product->product_s_desc && $autogen ='1' ) {

$document->setDescription( $product->product_s_desc );

} elseif ($product->metadesc) {

$document->setDescription( $product->metadesc );

  }


I wonder if there is now an auto meta generator, please advise.
Title: Re: How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0
Post by: AH on June 03, 2014, 10:23:51 AM
PRO helps with a default setting

Not sure why VM does not have a configuration for this important SEO element to prevent a non population.

QuoteTo auto generate
views/productdetails/view.html.php

if ($product->metadesc) {
         $document->setDescription( $product->metadesc);
      }



if ($product->metadesc) {
         $document->setDescription( $product->product_s_desc .$product->metadesc .$category->category_name);
      }


BUt you may wish to override this for certain products by directly editing the meta description


In that case you need to have the Product Meta overriding the "default"


  if ($product->metadesc) {
        $document->setDescription($product->metadesc);
    } else {
        $document->setDescription( $product->product_name . " " . $category->category_name . " " . $product->product_s_desc );

    }


A flag could be set to enable the AUTO element, but not sure why anyone would NOT want a META description populated



  if ($product->metadesc) {
        $document->setDescription($product->metadesc);
    } else if($autogen){
        $document->setDescription( $product->product_name . " ". $category->category_name . " ".$product->product_s_desc );

    }



You might also wish to consider the population of $product->customtitle