VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Sadicer on August 29, 2019, 17:07:30 PM

Title: How to add structured data?
Post by: Sadicer on August 29, 2019, 17:07:30 PM
How do you insert structured data into product pages? I have seen that I cannot add the JSON-LD code in the product description code view
Title: Re: How to add structured data?
Post by: GJC Web Design on August 29, 2019, 20:10:35 PM
It is already there in the standard templates

components\com_virtuemart\sublayouts\snippets.php
Title: Re: How to add structured data?
Post by: Sadicer on September 01, 2019, 22:01:45 PM
it's true, but this tool https://search.google.com › structured-data › testing-tool does not detect the code from my site https://www.sadiceramiche.altervista.org/  :-\
Title: Re: How to add structured data?
Post by: GJC Web Design on September 01, 2019, 22:19:26 PM
because it isn't there

add the sublayout correctly in your template -- check the std template to see how

if ($this->product->prices['salesPrice'] > 0) {
   echo shopFunctionsF::renderVmSubLayout('snippets',array('product'=>$this->product, 'currency'=>$this->currency, 'showRating'=>$this->showRating));
}
Title: Re: How to add structured data?
Post by: Sadicer on September 02, 2019, 22:26:43 PM
what does "std" mean? I didn't understand what you mean, don't use short words, please, I'm not very good with English
Title: Re: How to add structured data?
Post by: GJC Web Design on September 02, 2019, 22:34:07 PM
standard - core - native
Title: Re: How to add structured data?
Post by: Sadicer on September 04, 2019, 09:50:03 AM
ok.  can you explain how can I add the code?
Title: Re: How to add structured data?
Post by: GJC Web Design on September 04, 2019, 12:57:24 PM
It is explained above ... compare the stock template to yours!
If u can't then ask your template builder why they have not incl. snippets
Title: Re: How to add structured data?
Post by: Sadicer on November 05, 2019, 14:52:35 PM
thanks i solved. actually it was all settled, as you wrote, thanks.