This commit is contained in:
gRoussac committed 2013-11-27 00:06:44 +01:00
1 parent 5f5b9bd1de
commit 10dac5a45b
2 files changed
+9 -2

No files matched your search

+5 -1
View File
@@ -152,7 +152,11 @@ class CartCore extends ObjectModel
public function __construct($id = null, $id_lang = null) public function __construct($id = null, $id_lang = null)
{ {
parent::__construct($id, $id_lang); parent::__construct($id);
if (!is_null($id_lang))
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
if ($this->id_customer) if ($this->id_customer)
{ {
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer) if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
+4 -1
View File
@@ -122,7 +122,10 @@ class EmployeeCore extends ObjectModel
public function __construct($id = null, $id_lang = null, $id_shop = null) public function __construct($id = null, $id_lang = null, $id_shop = null)
{ {
parent::__construct($id, $id_lang, $id_shop); parent::__construct($id, null, $id_shop);
if (!is_null($id_lang))
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
if ($this->id) if ($this->id)
$this->associated_shops = $this->getAssociatedShops(); $this->associated_shops = $this->getAssociatedShops();