Author Topic: 2.6.8.b and earlier Product detail view empty meta tag description  (Read 1100 times)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3517
  • VirtueMart Version: 4.0.12.10777
2.6.8.b and earlier Product detail view empty meta tag description
« on: September 01, 2014, 17:17:16 PM »
If you have not added your own meta description on every product on setup

You will find Vm does not create a meta description element in the head

Bad for SEO and a bugger to have to add manually for every product

On the BIG assumption that your product description, category name and product short description have been considered for SEO

Then I recommend a base change to populate the meta tag description with some sensible data that is created on every product if the Prodcut data has not had a meta description created in admin.

components\com_virtuemart\views\productdetails\view.html.php


Code: [Select]
if ($product->metadesc) {
    $document->setDescription($product->metadesc);
}


with

Code: [Select]

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

}
//quorvia end
Regards
A

Joomla 3.10.11
php 8.0

slammy

  • Jr. Member
  • **
  • Posts: 169
  • vm supporter member
  • VirtueMart Version: vm 3.0.x and jml 3.4.5
Re: 2.6.8.b and earlier Product detail view empty meta tag description
« Reply #1 on: September 08, 2014, 11:47:49 AM »
nice idea Hutson and indeed much better than the massive and similiar global joomla descĀ“s from jml-be-configuration ...
regards jens