Author Topic: rich snippets / structured data  (Read 116 times)

vaineh

  • Beginner
  • *
  • Posts: 2
  • A beginner
rich snippets / structured data
« 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

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2639
  • VirtueMart Version: 3.2.5
Re: rich snippets / structured data
« Reply #1 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));
}
regards
A

Joomla 3.8.2
php 5.6 + php 7

vaineh

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: rich snippets / structured data
« Reply #2 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.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1142
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.6
Re: rich snippets / structured data
« Reply #3 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
Joomla 3.8.2
Virtuemart 3.2.6
Olympiantheme Hera (customized)