VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: vaineh on November 28, 2017, 16:08:32 PM

Title: rich snippets / structured data
Post by: vaineh on November 28, 2017, 16:08:32 PM
Hi there,

do I need to enable rich snippets / structured data anyway in virtuemart configuration?

From what I've read it I thought it was just built in, but on my test setup it's not working; https://search.google.com/structured-data/testing-tool#url=http%3A%2F%2Fdev.cariss.co.uk%2Ftcm%2Fproducts%2Fsponges%2Fhost-sponges-detail

I even switched to the beez3 template thinking maybe it was a problem with my template but it's the same; http://dev.cariss.co.uk/tcm/products/sponges/host-sponges-detail

Is there something I need to do or change to enable rich snippets?

many thanks
Title: Re: rich snippets / structured data
Post by: AH on November 28, 2017, 16:58:50 PM
It is enabled by default

But I cannot see it in your product page.

Your sales price has to > 0

if ($this->product->prices['salesPrice'] > 0) {
  echo shopFunctionsF::renderVmSubLayout('snippets',array('product'=>$this->product, 'currency'=>$this->currency, 'showRating'=>$this->showRating));
}
Title: Re: rich snippets / structured data
Post by: vaineh on November 29, 2017, 12:11:26 PM
Aha, many thanks. I'll have a look at changing it so that it can show when price is 0.
Title: Re: rich snippets / structured data
Post by: Jörgen on November 29, 2017, 13:07:10 PM
If it doesn´t break anything else for You, You could assign the price 0,0001. This is > 0

Regards

Jörgen @ Kreativ Fotografo