// improve multishop code, id_shop has an id different than 0 even if share_customer or share_order is true

This commit is contained in:
mBertholino
2011-12-13 13:37:59 +00:00
parent 79b74dc597
commit d189fd8ed0
4 changed files with 45 additions and 50 deletions
+1 -4
View File
@@ -187,10 +187,7 @@ class CustomerCore extends ObjectModel
public function add($autodate = true, $null_values = true)
{
if (Context::getContext()->shop->getGroup()->share_customer == true)
$this->id_shop = null;
else
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->getID();
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->getID();
$this->id_group_shop = ($this->id_group_shop) ? $this->id_group_shop : Context::getContext()->shop->getGroupID();
$this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days);
$this->secure_key = md5(uniqid(rand(), true));