[-] BO : BugFix : #PSCFV-2373 : Problem on country creation
This commit is contained in:
@@ -71,6 +71,7 @@ class CountryCore extends ObjectModel
|
|||||||
'table' => 'country',
|
'table' => 'country',
|
||||||
'primary' => 'id_country',
|
'primary' => 'id_country',
|
||||||
'multilang' => true,
|
'multilang' => true,
|
||||||
|
'multishop' => true,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'id_zone' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
'id_zone' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||||
'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ abstract class ObjectModelCore
|
|||||||
if ($id_lang)
|
if ($id_lang)
|
||||||
{
|
{
|
||||||
$sql->leftJoin($this->def['table'].'_lang', 'b', 'a.'.$this->def['primary'].' = b.'.$this->def['primary'].' AND b.id_lang = '.(int)$id_lang);
|
$sql->leftJoin($this->def['table'].'_lang', 'b', 'a.'.$this->def['primary'].' = b.'.$this->def['primary'].' AND b.id_lang = '.(int)$id_lang);
|
||||||
if ($this->id_shop)
|
if ($this->id_shop && !empty($this->def['multilang_shop']))
|
||||||
$sql->where('b.id_shop = '.$this->id_shop);
|
$sql->where('b.id_shop = '.$this->id_shop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -384,9 +384,6 @@ class AdminCountriesControllerCore extends AdminController
|
|||||||
$tmp_addr_format->id_country = $id_country;
|
$tmp_addr_format->id_country = $id_country;
|
||||||
}
|
}
|
||||||
|
|
||||||
$object = new $this->className();
|
|
||||||
$this->updateAssoShop($object->id);
|
|
||||||
|
|
||||||
$tmp_addr_format->format = Tools::getValue('address_layout');
|
$tmp_addr_format->format = Tools::getValue('address_layout');
|
||||||
|
|
||||||
if (strlen($tmp_addr_format->format) > 0)
|
if (strlen($tmp_addr_format->format) > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user