| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/plugins/vmcustom/itemrating/itemrating/tmpl/ |
Upload File : |
<?php
/**
* @version 2.1.6
* @package com_itemrating
* @copyright Copyright (C) 2014. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Joomunited <contact@joomunited.com> - www.joomunited.com
*/
defined('_JEXEC') or die();
require_once JPATH_SITE . '/components/com_itemrating/helpers/itemrating.php';
$item=new stdClass();
$product = $viewData[0];
$params = $viewData[1];
$currencyDisplay = CurrencyDisplay::getInstance( );
$item->id=$product->virtuemart_product_id;
$item->introtext=$product->product_s_desc;
$item->title=$product->product_name;
$item->created=JFactory::getDate($product->created_on)->Format('d-m-Y');
$item->modified=JFactory::getDate($product->modified_on)->Format('d-m-Y');
$item->author=JFactory::getUser($product->created_by)->name;
$item->productcategory=$product->category_name;
$item->quantity=$product->quantity;
$item->brand=$product->mf_name;
$item->productprice=$currencyDisplay->priceDisplay($product->prices['salesPrice'],0,1,false);
$product_model = VmModel::getModel('product');
$product_model->addImages($product);
$image = $product->images[0];
preg_match_all("/<img .*?(?=src)src=\"([^\"]+)\"/si", $image->displayMediaFull("",false), $m);
$item->image=str_replace(JURI::base(),'',$m[1][0]);
$item->voteallowed=1;
$currency_model = VmModel::getModel('currency');
$displayCurrency = $currency_model->getCurrency( $product->prices['product_currency'] );
$item->currency=$displayCurrency->currency_code_3;
$stockhandle = VmConfig::get ('stockhandle', 'none');
if (($stockhandle == 'disableit' or $stockhandle == 'disableadd') ) {
$item->quanitity=$product->product_in_stock - $product->product_ordered;
}
else
{
$item->quanitity=1;
}
$item->attribs=json_encode(array("groupdata"=>$params->custom_groupdata,'textforscore'=>$params->custom_textforscore,'reviewsummary'=>$params->custom_reviewsummary,'pros'=>$params->custom_pros,'cons'=>$params->custom_cons));
$html = ItemratingHelper::loadWidget($item,"top");
if(!$html)
{
$html = ItemratingHelper::loadWidget($item,"bottom");
}
echo $html;
?>