From 1b88a7a9add0f95f09dd836b0e6331010efca99b Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 29 Feb 2012 10:45:22 +0000 Subject: [PATCH] // Fix stock on shop import --- classes/shop/Shop.php | 1 + controllers/admin/AdminShopController.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 10d7fccf0..f7e38eb68 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -94,6 +94,7 @@ class ShopCore extends ObjectModel 'store' => array('type' => 'shop'), 'webservice_account' => array('type' => 'shop'), 'warehouse' => array('type' => 'shop'), + 'stock_available' => array('type' => 'fk_shop'), ); protected $webserviceParameters = array( diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index 09ca456dd..1e0b71c6b 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -319,7 +319,7 @@ class AdminShopControllerCore extends AdminController if (Tools::isSubmit('id_shop')) { - $shop = new Shop(Tools::getValue('id_shop')); + $shop = new Shop((int)Tools::getValue('id_shop')); $parent = $shop->id_category; } else @@ -405,7 +405,6 @@ class AdminShopControllerCore extends AdminController 'stock_available' => $this->l('Available quantities for sale'), 'store' => $this->l('Stores'), 'warehouse' => $this->l('Warehouse'), - 'stock_available' => $this->l('Stock Available'), ); if (!$this->object->id)