VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: Thanasis on November 20, 2018, 17:58:57 pm

Title: total number of reviws and custom fields
Post by: Thanasis 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.
Title: Re: total number of reviws and custom fields
Post by: Studio 42 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.