Tableau des Stats Responsive

15 décembre 2015

Deux fichiers à modifier afin de consulter vos statistiques sur votre mobile dans un format adapté

 

1/ Modifier le php du module Statsforecast à la ligne 151 – Ajout d’id CSS et de data-title sur les td

';

$visit_array = array();
$sql = 'SELECT '.$date_from_gadd.' as fix_date, COUNT(*) as visits
FROM '._DB_PREFIX_.'connections c
WHERE c.date_add BETWEEN '.ModuleGraph::getDateBetween().'
'.Shop::addSqlRestriction(false, 'c').'
GROUP BY '.$date_from_gadd;
$visits = Db::getInstance()->query($sql);
while ($row = $db->nextRow($visits))
$visit_array[$row['fix_date']] = $row['visits'];

foreach ($data_table as $row)

$this->html .= '

'.$this->l('Visits').' '.$this->l('Registrations').' '.$this->l('Placed orders').' '.$this->l('Bought items').' '.$this->l('Percentage of registrations').' '.$this->l('Percentage of orders').' '.$this->l('Revenue').'
'.$this->l('Visits').' '.$this->l('Registrations').' '.$this->l('Placed orders').' '.$this->l('Bought items').' '.$this->l('Percentage of registrations').' '.$this->l('Percentage of orders').' '.$this->l('Revenue').'
l('Total').' »>'.$this->l('Total').' l('Visits').' » class= »text-center »>'.(int)$this->t1.' l('Registrations').' » class= »text-center »>'.(int)$this->t2.' l('Placed orders').' » class= »text-center »>'.(int)$this->t3.' l('Bought items').' » class= »text-center »>'.(int)$this->t4.' l('Percentage of registrations').' » class= »text-center »>– l('Percentage of orders').' » class= »text-center »>– l('Revenue').' » class= »text-right »>'.Tools::displayPrice($this->t8, $currency).'
l('Average').' »>'.$this->l('Average').' l('Visits').' » class= »text-center »>'.(int)($this->t1 / $interval_avg).' l('Registrations').' » class= »text-center »>'.(int)($this->t2 / $interval_avg).' l('Placed orders').' » class= »text-center »>'.(int)($this->t3 / $interval_avg).' l('Bought items').' » class= »text-center »>'.(int)($this->t4 / $interval_avg).' l('Percentage of registrations').' » class= »text-center »>'.($this->t1 ? round(100 * $this->t2 / $this->t1, 2).' %' : '-').' l('Percentage of orders').' » class= »text-center »>'.($this->t1 ? round(100 * $this->t3 / $this->t1, 2).' %' : '-').' l('Revenue').' » class= »text-right »>'.Tools::displayPrice($this->t8 / $interval_avg, $currency).'
l('Forecast').' »>'.$this->l('Forecast').' l('Visits').' » class= »text-center »>'.(int)($this->t1 * $prop30).' l('Registrations').' » class= »text-center »>'.(int)($this->t2 * $prop30).' l('Placed orders').' » class= »text-center »>'.(int)($this->t3 * $prop30).' l('Bought items').' » class= »text-center »>'.(int)($this->t4 * $prop30).' l('Percentage of registrations').' » class= »text-center »>– l('Percentage of orders').' » class= »text-center »>– l('Revenue').' » class= »text-right »>'.Tools::displayPrice($this->t8 * $prop30, $currency).'

';

2/ Ajouter au admin theme css

@media (max-width: 900px)

Aller en haut