News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to turn on Meta KEYWORDS or Meta Description on Virtuemart2.0

Started by sodego, January 15, 2012, 19:04:15 PM

Previous topic - Next topic

sodego

Does Virtuemart2 support any meta Keywords or Meta Description ?
If so. How can I turn it on?

Milbo

of course, read the feature list, should be listed there,.. there is nothing to turn it on, it is always activated
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sodego

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sirius

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)
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095

PRO

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]

sirius

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 );

  }
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095

riga75

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?

jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

riga75

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?

zainabubu

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.

AH

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
Regards
A

Joomla 4.4.5
php 8.1