// Fix shop import stock available
This commit is contained in:
@@ -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 ?
|
||||||
|
|||||||
@@ -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.'
|
||||||
|
|||||||
@@ -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'),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user