// Stock Management : Show stock interfaces only if the option is active in the configuration + debug
This commit is contained in:
@@ -1174,6 +1174,12 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
if (Tab::checkTabRights($tab['id_tab']) === true)
|
||||
{
|
||||
if ($tab['name'] == 'Stock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0)
|
||||
{
|
||||
unset($tabs[$index]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$img_cache_url = 'themes/'.$this->context->employee->bo_theme.'/img/t/'.$tab['class_name'].'.png';
|
||||
$img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.$img_cache_url);
|
||||
// retrocompatibility : change png to gif if icon not exists
|
||||
|
||||
+2
-2
@@ -944,9 +944,9 @@ class ProductCore extends ObjectModel
|
||||
return false;
|
||||
|
||||
//Try to set available quantitiy if product quantity not depend on stock
|
||||
$depend_on_stock = StockAvailable::dependsOnStock($this->id);
|
||||
$depends_on_stock = StockAvailable::dependsOnStock($this->id);
|
||||
|
||||
if (!$depend_on_stock)
|
||||
if (!$depends_on_stock)
|
||||
if (!StockAvailable::updateQuantity($this->id, $id_product_attribute, $quantity))
|
||||
{
|
||||
$stock_available = new StockAvailable();
|
||||
|
||||
Reference in New Issue
Block a user