diff --git a/classes/AdminController.php b/classes/AdminController.php index 1cfaf8bb2..28703b50f 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -1642,7 +1642,7 @@ class AdminControllerCore extends Controller { $this->display_header = false; $this->display_footer = false; - $this->content_only = true; + $this->content_only = false; } // Change shop context ? diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 8dcc51c5d..10f43e83b 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -85,7 +85,7 @@ class ShopCore extends ObjectModel 'store' => array('type' => 'shop'), 'webservice_account' => array('type' => 'shop'), 'warehouse' => array('type' => 'shop'), - 'stock_available' => array('type' => 'fk_shop'), + 'stock_available' => array('type' => 'fk_shop', 'primary' => 'id_stock_available'), ); protected $webserviceParameters = array( @@ -167,8 +167,8 @@ class ShopCore extends ObjectModel else $table_name .= '_'.$row['type']; $res &= Db::getInstance()->execute(' - DELETE FROM `'._DB_PREFIX_.$table_name.'` - WHERE `'.$id.'`='.(int)$this->id + DELETE FROM `'.bqSQL(_DB_PREFIX_.$table_name).'` + WHERE `'.bqSQL($id).'`='.(int)$this->id ); } @@ -445,7 +445,7 @@ class ShopCore extends ObjectModel { $select .= ', es.id_employee'; $from .= 'LEFT JOIN '._DB_PREFIX_.'employee_shop es ON es.id_shop = s.id_shop'; - $where .= 'AND es.id_employee = '.$employee->id; + $where .= 'AND es.id_employee = '.(int)$employee->id; } $sql = 'SELECT gs.*, s.*, gs.name AS group_name, s.name AS shop_name, s.active, su.domain, su.domain_ssl, su.physical_uri, su.virtual_uri'.$select.' diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index a9b7c0065..2c5709462 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -284,7 +284,7 @@ class AdminShopControllerCore extends AdminController 'product' => $this->l('Products'), 'product_lang' => $this->l('Products lang'), 'scene' => $this->l('Scenes'), - 'stock' => $this->l('Stock'), + 'stock_available' => $this->l('Stock'), 'store' => $this->l('Stores'), 'warehouse' => $this->l('Warehouse'), );