// 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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user