//FIxed Added Controller AdminCarrierController

This commit is contained in:
lLefevre
2011-10-19 14:36:25 +00:00
parent 41140ad21d
commit 99aa249393
9 changed files with 934 additions and 27 deletions
+3 -3
View File
@@ -225,7 +225,6 @@ abstract class AdminTabCore
// if ($className == 'AdminCategories' OR $className == 'AdminProducts')
// $className = 'AdminCatalog';
$this->token = Tools::getAdminToken($className.(int)$this->id.(int)$this->context->employee->id);
if (!Shop::isFeatureActive())
$this->shopLinkType = '';
}
@@ -561,6 +560,7 @@ abstract class AdminTabCore
{
if (!isset($this->table))
return false;
// set token
$token = Tools::getValue('token') ? Tools::getValue('token') : $this->token;
@@ -1271,7 +1271,7 @@ abstract class AdminTabCore
$limit = ((!isset($this->context->cookie->{$this->table.'_pagination'})) ? $this->_pagination[1] : $limit = $this->context->cookie->{$this->table.'_pagination'});
if (!Validate::isTableOrIdentifier($this->table))
die (Tools::displayError('Table name is invalid:').' "'.$this->table.'"');
$this->_errors[] = Tools::displayError('Table name is invalid:').' "'.$this->table.'"';
if (empty($orderBy))
$orderBy = $this->context->cookie->__get($this->table.'Orderby') ? $this->context->cookie->__get($this->table.'Orderby') : $this->_defaultOrderBy;
@@ -1340,7 +1340,7 @@ abstract class AdminTabCore
if (Shop::isFeatureActive() && Context::shop() != Shop::CONTEXT_ALL && !preg_match('#`?'.preg_quote(_DB_PREFIX_.$this->table.'_'.$filterKey).'`? *sa#', $this->_join))
$filterShop = 'JOIN `'._DB_PREFIX_.$this->table.'_'.$filterKey.'` sa ON (sa.'.$this->identifier.' = a.'.$this->identifier.' AND sa.id_'.$filterKey.' IN ('.implode(', ', $idenfierShop).'))';
}
///////////////////////
/* Query in order to get results with all fields */
$sql = 'SELECT SQL_CALC_FOUND_ROWS
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').'
-20
View File
@@ -923,26 +923,6 @@ class OrderCore extends ObjectModel
$this->update();
}
public static function printPDFIcons($id_order, $tr)
{
$order = new Order($id_order);
$orderState = OrderHistory::getLastOrderState($id_order);
if (!Validate::isLoadedObject($orderState) OR !Validate::isLoadedObject($order))
die(Tools::displayError('Invalid objects'));
echo '<span style="width:20px; margin-right:5px;">';
if (($orderState->invoice AND $order->invoice_number) AND (int)($tr['product_number']))
echo '<a href="pdf.php?id_order='.(int)($order->id).'&pdf"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>';
else
echo '&nbsp;';
echo '</span>';
echo '<span style="width:20px;">';
if ($orderState->delivery AND $order->delivery_number)
echo '<a href="pdf.php?id_delivery='.(int)($order->delivery_number).'"><img src="../img/admin/delivery.gif" alt="delivery" /></a>';
else
echo '&nbsp;';
echo '</span>';
}
public static function getByDelivery($id_delivery)
{
$sql = 'SELECT id_order