// Some improvements on BackOffice orders

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9810 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-02 19:19:03 +00:00
parent 12aa189913
commit fe7dfe0460
8 changed files with 105 additions and 56 deletions
+5 -6
View File
@@ -1028,9 +1028,6 @@ class AdminControllerCore extends Controller
'token_admin_messages' => Tools::getAdminTokenLite('AdminMessages'),
'token_admin_employees' => Tools::getAdminTokenLite('AdminEmployees'),
'token_admin_search' => Tools::getAdminTokenLite('AdminSearch'),
'table' => $this->table,
'current' => self::$currentIndex,
'token' => $this->token,
'first_name' => Tools::substr($this->context->employee->firstname, 0, 1),
'last_name' => htmlentities($this->context->employee->lastname, ENT_COMPAT, 'UTF-8'),
'base_url' => $this->context->shop->getBaseURL(),
@@ -1104,9 +1101,6 @@ class AdminControllerCore extends Controller
}
$this->context->smarty->assign(array(
'table' => $this->table,
'current' => self::$currentIndex,
'token' => $this->token,
'content' => $this->content,
'url_post' => self::$currentIndex.'&token='.$this->token,
));
@@ -1522,6 +1516,11 @@ class AdminControllerCore extends Controller
}
if ($this->ajax && method_exists($this, 'ajaxPreprocess'))
$this->ajaxPreProcess();
$this->context->smarty->assign(array(
'table' => $this->table,
'current' => self::$currentIndex,
'token' => $this->token,
));
}
/**
+8
View File
@@ -685,4 +685,12 @@ class CartRuleCore extends ObjectModel
{
return (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
}
public static function getCartsRuleByCode($name, $id_lang)
{
return Db::getInstance()->ExecuteS('SELECT cr.*, crl.*
FROM '._DB_PREFIX_.'cart_rule cr
LEFT JOIN '._DB_PREFIX_.'cart_rule_lang crl ON (cr.id_cart_rule = crl.id_cart_rule AND crl.id_lang='.(int)$id_lang.')
WHERE name LIKE \'%'.pSQL($name).'%\'');
}
}
-8
View File
@@ -252,12 +252,4 @@ class DiscountCore extends CartRule
return $voucher;
}
public static function getVoucherByName($name, $id_lang)
{
return Db::getInstance()->ExecuteS('SELECT d.*, dl.*
FROM '._DB_PREFIX_.'discount d
LEFT JOIN '._DB_PREFIX_.'discount_lang dl ON (d.id_discount = dl.id_discount AND dl.id_lang='.(int)$id_lang.')
WHERE name LIKE \'%'.pSQL($name).'%\'');
}
}