// Context part 27

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-29 14:29:57 +00:00
parent 35748d1b8f
commit 5d090a25b3
66 changed files with 532 additions and 813 deletions
+5 -6
View File
@@ -134,10 +134,9 @@ class StatsCatalog extends Module
public function hookAdminStatsModules($params)
{
$context = Context::getContext();
$categories = Category::getCategories($context->language->id, true, false);
$productToken = Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)$context->employee->id);
$categories = Category::getCategories($this->context->language->id, true, false);
$productToken = Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)$this->context->employee->id);
$irow = 0;
if ($id_category = (int)(Tools::getValue('id_category')))
@@ -153,7 +152,7 @@ class StatsCatalog extends Module
$totalPictures = $result1['images'];
$averagePictures = $total ? $totalPictures / $total : 0;
$neverBought = $this->getProductsNB($context->language->id);
$neverBought = $this->getProductsNB($this->context->language->id);
$totalNB = $neverBought['total'];
$productsNB = $neverBought['result'];
@@ -187,7 +186,7 @@ class StatsCatalog extends Module
<div class="clear space"></div>
<table>
'.$this->returnLine($this->l('Products available:'), (int)($total)).'
'.$this->returnLine($this->l('Average price (base price):'), Tools::displayPrice($averagePrice, $context->currency)).'
'.$this->returnLine($this->l('Average price (base price):'), Tools::displayPrice($averagePrice, $this->context->currency)).'
'.$this->returnLine($this->l('Product pages viewed:'), (int)($totalPageViewed)).'
'.$this->returnLine($this->l('Products bought:'), (int)($totalBought)).'
'.$this->returnLine($this->l('Average number of page visits:'), number_format((float)($averageViewed), 2, '.', '')).'
@@ -217,7 +216,7 @@ class StatsCatalog extends Module
<td style="width: 400px;">'.$product['name'].'</td>
<td style="text-align: right">
<a href="index.php?tab=AdminCatalog&id_product='.$product['id_product'].'&addproduct&token='.$productToken.'" target="_blank"><img src="../modules/'.$this->name.'/page_edit.png" /></a>
<a href="'.$context->link->getProductLink($product['id_product'], $product['link_rewrite']).'" target="_blank"><img src="../modules/'.$this->name.'/application_home.png" /></a>
<a href="'.$this->context->link->getProductLink($product['id_product'], $product['link_rewrite']).'" target="_blank"><img src="../modules/'.$this->name.'/application_home.png" /></a>
</td>
</tr>';
$html .= '