[-] BugFix : Problem on changing warehouse in admin stock instant state
This commit is contained in:
1 parent
a819f7238d
commit
e43a3cab6f
2 files changed
+5
-2
No files matched your search
@@ -24,11 +24,11 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
{if count($list_warehouses) > 1}
|
{if count($list_warehouses) > 1}
|
||||||
<form type="get" onchange="submit();">
|
<form type="get">
|
||||||
<label for="wareouse">{l s="Select a warehouse:"}</label>
|
<label for="wareouse">{l s="Select a warehouse:"}</label>
|
||||||
<input type="hidden" name="controller" value="AdminStockInstantState" />
|
<input type="hidden" name="controller" value="AdminStockInstantState" />
|
||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
<select name="warehouse">
|
<select name="warehouse" onchange="$(this).parent().submit();">
|
||||||
{foreach $list_warehouses as $warehouse}
|
{foreach $list_warehouses as $warehouse}
|
||||||
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
|
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ class AdminStockInstantStateControllerCore extends AdminController
|
|||||||
$warehouse = 1;
|
$warehouse = 1;
|
||||||
if ((int)Tools::getValue('warehouse'))
|
if ((int)Tools::getValue('warehouse'))
|
||||||
$warehouse = (int)Tools::getValue('warehouse');
|
$warehouse = (int)Tools::getValue('warehouse');
|
||||||
|
else if ((int)$this->context->cookie->warehouse)
|
||||||
|
$warehouse = (int)$this->context->cookie->warehouse;
|
||||||
|
$this->context->cookie->warehouse = $warehouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $warehouse;
|
return $warehouse;
|
||||||
|
|||||||
Reference in new issue
Block a user