// improve multishop code with id_shop = 0 when share_customer or share_order is true

This commit is contained in:
mBertholino
2011-12-13 11:59:41 +00:00
parent cd44e07056
commit 1d0a0a5395
5 changed files with 192 additions and 152 deletions
+15
View File
@@ -298,6 +298,21 @@ class OrderCore extends ObjectModel
$this->_taxCalculationMethod = Group::getDefaultPriceDisplayMethod();
}
public function add($autodate = true, $null_values = false)
{
if (Context::getContext()->shop->getGroup()->share_order == true)
$this->id_shop = null;
return parent::add($autodate);
}
public function update($null_values = false)
{
if (Context::getContext()->shop->getGroup()->share_order == true)
$this->id_shop = null;
$return = parent::update();
return $return;
}
public function getTaxCalculationMethod()
{
return (int)($this->_taxCalculationMethod);