// Remove old code and calls to AdminCatalog

This commit is contained in:
tDidierjean
2012-01-10 17:16:54 +00:00
parent 9d4dac5363
commit 2560f50da8
9 changed files with 14 additions and 406 deletions
+2 -2
View File
@@ -136,7 +136,7 @@ class StatsCatalog extends Module
public function hookAdminStatsModules($params)
{
$categories = Category::getCategories($this->context->language->id, true, false);
$productToken = Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)$this->context->employee->id);
$productToken = Tools::getAdminToken('AdminProducts'.(int)(Tab::getIdFromClassName('AdminProducts')).(int)$this->context->employee->id);
$irow = 0;
if ($id_category = (int)(Tools::getValue('id_category')))
@@ -216,7 +216,7 @@ class StatsCatalog extends Module
<td>'.$product['id_product'].'</td>
<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="index.php?tab=AdminProducts&id_product='.$product['id_product'].'&addproduct&token='.$productToken.'" target="_blank"><img src="../modules/'.$this->name.'/page_edit.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>';
+2 -2
View File
@@ -224,11 +224,11 @@ class StatsProduct extends ModuleGraph
<th>'.$this->l('Average price').'</th>
</tr>
</thead><tbody>';
$tokenProducts = Tools::getAdminToken('AdminCatalog'.(int)Tab::getIdFromClassName('AdminCatalog').(int)$this->context->employee->id);
$tokenProducts = Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)$this->context->employee->id);
foreach ($crossSelling as $selling)
$this->html .= '
<tr>
<td ><a href="?tab=AdminCatalog&id_product='.(int)$selling['id_product'].'&addproduct&token='.$tokenProducts.'">'.$selling['pname'].'</a></td>
<td ><a href="?tab=AdminProducts&id_product='.(int)$selling['id_product'].'&addproduct&token='.$tokenProducts.'">'.$selling['pname'].'</a></td>
<td align="center">'.(int)$selling['pqty'].'</td>
<td align="right">'.Tools::displayprice($selling['pprice'], $currency).'</td>
</tr>';