Author Topic: Adding code to productpage  (Read 434 times)

Olive

  • Beginner
  • *
  • Posts: 6
    • DENDRES Olive oil products
  • VirtueMart Version: 3.8.8
Adding code to productpage
« 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


pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1129
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Adding code to productpage
« Reply #1 on: April 22, 2021, 17:03:47 pm »
I am wondering after every post there too :)

You are talking about rich snippets?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10137
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Adding code to productpage
« Reply #2 on: April 22, 2021, 18:49:29 pm »
u have to obtain them programmatically from the $this->product object
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Olive

  • Beginner
  • *
  • Posts: 6
    • DENDRES Olive oil products
  • VirtueMart Version: 3.8.8
Re: Adding code to productpage
« Reply #3 on: April 22, 2021, 20:21:10 pm »
For the rich snippets indeed.
And to show the stars and reviews on the product page.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4448
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Adding code to productpage
« Reply #4 on: April 27, 2021, 07:53:11 am »
Check in JOOMLA/components/com_virtuemart/sublayouts/snippets.php

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1129
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Adding code to productpage
« Reply #5 on: April 27, 2021, 10:53:49 am »
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates