Author Topic: total number of reviws and custom fields  (Read 176 times)

Thanasis

  • Beginner
  • *
  • Posts: 22
  • netadmin.gr
total number of reviws and custom fields
« on: November 20, 2018, 17:58:57 pm »
Hi, i have joomla 3 with virtuemart 3 and a custom template, i have tabs on product details page for reviews and videos (the video is added from a custom field). What i want is a way to count the total number of reviews and total number tha custom fieled to diplay on tabs. For example:
Details | Reviews (2) | Videos (1)|

Thanks.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3518
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: total number of reviws and custom fields
« Reply #1 on: November 21, 2018, 18:44:07 pm »
You need to find the PHP about review and your customfield in the position you have the videos.
See \components\com_virtuemart\views\productdetails\tmpl\default_reviews.php about reviews code
$this->product->customfieldsSorted['yourposition'] to get the video customfield.