// Fix shop import stock available

This commit is contained in:
rGaillard
2011-11-23 22:19:48 +00:00
parent 15666b4604
commit 331c0897a7
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1642,7 +1642,7 @@ class AdminControllerCore extends Controller
{ {
$this->display_header = false; $this->display_header = false;
$this->display_footer = false; $this->display_footer = false;
$this->content_only = true; $this->content_only = false;
} }
// Change shop context ? // Change shop context ?
+4 -4
View File
@@ -85,7 +85,7 @@ class ShopCore extends ObjectModel
'store' => array('type' => 'shop'), 'store' => array('type' => 'shop'),
'webservice_account' => array('type' => 'shop'), 'webservice_account' => array('type' => 'shop'),
'warehouse' => 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( protected $webserviceParameters = array(
@@ -167,8 +167,8 @@ class ShopCore extends ObjectModel
else else
$table_name .= '_'.$row['type']; $table_name .= '_'.$row['type'];
$res &= Db::getInstance()->execute(' $res &= Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.$table_name.'` DELETE FROM `'.bqSQL(_DB_PREFIX_.$table_name).'`
WHERE `'.$id.'`='.(int)$this->id WHERE `'.bqSQL($id).'`='.(int)$this->id
); );
} }
@@ -445,7 +445,7 @@ class ShopCore extends ObjectModel
{ {
$select .= ', es.id_employee'; $select .= ', es.id_employee';
$from .= 'LEFT JOIN '._DB_PREFIX_.'employee_shop es ON es.id_shop = s.id_shop'; $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.' $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.'
+1 -1
View File
@@ -284,7 +284,7 @@ class AdminShopControllerCore extends AdminController
'product' => $this->l('Products'), 'product' => $this->l('Products'),
'product_lang' => $this->l('Products lang'), 'product_lang' => $this->l('Products lang'),
'scene' => $this->l('Scenes'), 'scene' => $this->l('Scenes'),
'stock' => $this->l('Stock'), 'stock_available' => $this->l('Stock'),
'store' => $this->l('Stores'), 'store' => $this->l('Stores'),
'warehouse' => $this->l('Warehouse'), 'warehouse' => $this->l('Warehouse'),
); );