// bug fix with suppliers and warehouses on product save action in back-office
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11286 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -27,15 +27,15 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input').keypress(function(e) {
|
$('input').keypress(function(e) {
|
||||||
var code = null;
|
var code = null;
|
||||||
code = (e.keyCode ? e.keyCode : e.which);
|
code = (e.keyCode ? e.keyCode : e.which);
|
||||||
return (code == 13) ? false : true;
|
return (code == 13) ? false : true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<input type="hidden" name="supplier_loaded" value="1">
|
||||||
{if isset($product->id)}
|
{if isset($product->id)}
|
||||||
|
|
||||||
<h4>{l s='Suppliers of the current product'}</h4>
|
<h4>{l s='Suppliers of the current product'}</h4>
|
||||||
|
|||||||
@@ -27,15 +27,15 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input').keypress(function(e) {
|
$('input').keypress(function(e) {
|
||||||
var code = null;
|
var code = null;
|
||||||
code = (e.keyCode ? e.keyCode : e.which);
|
code = (e.keyCode ? e.keyCode : e.which);
|
||||||
return (code == 13) ? false : true;
|
return (code == 13) ? false : true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<input type="hidden" name="warehouse_loaded" value="1">
|
||||||
{if isset($product->id)}
|
{if isset($product->id)}
|
||||||
|
|
||||||
<h4>{l s='Product location in warehouses'}</h4>
|
<h4>{l s='Product location in warehouses'}</h4>
|
||||||
|
|||||||
@@ -2078,7 +2078,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function processSuppliers($token)
|
public function processSuppliers($token)
|
||||||
{
|
{
|
||||||
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
if (Tools::getValue('supplier_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
||||||
{
|
{
|
||||||
// Get all id_product_attribute
|
// Get all id_product_attribute
|
||||||
$attributes = $product->getAttributesResume($this->context->language->id);
|
$attributes = $product->getAttributesResume($this->context->language->id);
|
||||||
@@ -2256,7 +2256,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function processWarehouses($token)
|
public function processWarehouses($token)
|
||||||
{
|
{
|
||||||
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
if (Tools::getValue('warehouse_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
||||||
{
|
{
|
||||||
// Get all id_product_attribute
|
// Get all id_product_attribute
|
||||||
$attributes = $product->getAttributesResume($this->context->language->id);
|
$attributes = $product->getAttributesResume($this->context->language->id);
|
||||||
|
|||||||
Reference in New Issue
Block a user