[-] BO: Fix multishop employee restriction on cart and catalog price rules PSCFV-2505

This commit is contained in:
rGaillard
2012-05-25 17:12:55 +00:00
parent 9e8dbc60df
commit be1cd70887
3 changed files with 22 additions and 8 deletions
@@ -130,6 +130,10 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
if (!$this->object->id)
$this->object->price = -1;
$shops = Shop::getShops();
if (count($this->context->employee->getAssociatedShops()) > 1)
$shops = array_merge(array(0 => array('id_shop' => 0, 'name' => $this->l('All shops'))), $shops);
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Specific price rules'),
@@ -149,7 +153,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
'label' => $this->l('Shop:'),
'name' => 'id_shop',
'options' => array(
'query' => array_merge(array(0 => array('id_shop' => 0, 'name' => $this->l('All shops'))), Shop::getShops()),
'query' => $shops,
'id' => 'id_shop',
'name' => 'name'
),