'.$this->l('You must enable the "Save global page views" option from ').'
Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the QloApps Google Analytics module.').'
';
}
return array('header' => $header, 'body' => $body);
}
public function getTableTop10MostSearch($date_from, $date_to)
{
$header = array(
array(
'id' => 'reference',
'title' => $this->l('Hotel'),
'class' => 'text-center'
),
array(
'id' => 'image',
'title' => $this->l('Cover image'),
'class' => 'text-center'
),
array(
'id' => 'location',
'title' => $this->l('Location'),
'class' => 'text-center'
),
array(
'id' => 'count',
'title' => $this->l('Count'),
'class' => 'text-center'
),
// array(
// 'id' => 'totalQuantitySold',
// 'title' => $this->l('Results'),
// 'class' => 'text-center'
// )
);
if (Configuration::get('PS_STATSDATA_PAGESVIEWS')) {
$hotels = $this->getMostSearchedHotels(
$date_from,
$date_to,
(int)Configuration::get('DASHPRODUCT_NBR_SHOW_TOP_SEARCH')
);
$body = array();
if (is_array($hotels) && count($hotels))
foreach ($hotels as $hotel) {
$objHotelBranch = new HotelBranchInformation($hotel['id_hotel'], $this->context->language->id);
$addressInfo = $objHotelBranch->getAddress($hotel['id_hotel']);
$tr = array();
$tr[] = array(
'id' => 'reference',
'value' => ''.$this->l('You must enable the "Save global page views" option from ').'
Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the QloApps Google Analytics module.').'
';
}
return array('header' => $header, 'body' => $body);
}
public function getHotelImage($idHotel)
{
$noPictureImagePath = _PS_IMG_.'p/en.jpg';
$hotelImage = HotelImage::getCover($idHotel);
if (is_array($hotelImage) && count($hotelImage)) {
$objHotelImage = new HotelImage();
$imgLink = $this->context->link->getMediaLink($objHotelImage->getImageLink($hotelImage['id'], ImageType::getFormatedName('small')));
} else {
$imgLink = $this->context->link->getMediaLink($noPictureImagePath);
}
return '