// Warehouses & supply orders : default country / lang / currency are now loaded by default in the forms

This commit is contained in:
bMancone
2012-01-30 16:29:17 +00:00
parent 7129ea0fa6
commit b183432e22
2 changed files with 16 additions and 1 deletions
@@ -137,6 +137,13 @@ class AdminWarehousesControllerCore extends AdminController
$query->where('active = 1');
$employees_array = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
// sets countries
$countries = Country::getCountries($this->context->language->id, false);
$id_default_country = Configuration::get('PS_SHOP_COUNTRY_ID');
if (isset($countries[$id_default_country]))
$countries = array($id_default_country => $countries[$id_default_country]) + $countries;
// sets the title of the toolbar
$this->toolbar_title = $this->l('Stock : Warehouse management');
@@ -216,7 +223,7 @@ class AdminWarehousesControllerCore extends AdminController
'name' => 'id_country',
'required' => true,
'options' => array(
'query' => Country::getCountries($this->context->language->id, false),
'query' => $countries,
'id' => 'id_country',
'name' => 'name'
),