VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Olive on April 22, 2021, 14:07:34 PM

Title: Adding code to productpage
Post by: Olive on April 22, 2021, 14:07:34 PM
I am wondering where to add a yotpo review code to the productpage?

I guess it must be here...
components/com_virtuemart/views/productdetails

But the code must be on EACH different productpage

<div class="yotpo yotpo-main-widget"
data-product-id="SKU/Product_ID"
data-price="Product Price"
data-currency="Price Currency"
data-name="Product Title"
data-url="The url of your product page"
data-image-url="The product image url">
</div>


Where do i find these productpages?

I use joomla 3.9.26
VM 3.8.8

Title: Re: Adding code to productpage
Post by: pinochico on April 22, 2021, 17:03:47 PM
I am wondering after every post there too :)

You are talking about rich snippets?
Title: Re: Adding code to productpage
Post by: GJC Web Design on April 22, 2021, 18:49:29 PM
u have to obtain them programmatically from the $this->product object
Title: Re: Adding code to productpage
Post by: Olive on April 22, 2021, 20:21:10 PM
For the rich snippets indeed.
And to show the stars and reviews on the product page.
Title: Re: Adding code to productpage
Post by: Studio 42 on April 27, 2021, 07:53:11 AM
Check in JOOMLA/components/com_virtuemart/sublayouts/snippets.php
Title: Re: Adding code to productpage
Post by: pinochico on April 27, 2021, 10:53:49 AM
Or any plugins for Rich Snippets for VM:
https://www.minijoomla.org/extensions/virtuemart-extensions/rich-snippets-for-virtuemart