From 48be09d82d88e2afaea4f3bf20debd3865e08ea3 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 25 Nov 2013 17:37:26 +0100 Subject: [PATCH 1/2] // Missing Base uri in uploader helper --- classes/helper/HelperUploader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/helper/HelperUploader.php b/classes/helper/HelperUploader.php index 9c844596d..f4968f44e 100644 --- a/classes/helper/HelperUploader.php +++ b/classes/helper/HelperUploader.php @@ -251,8 +251,8 @@ class HelperUploaderCore extends Uploader .'/themes/'.$bo_theme.'/js/jquery.fileupload-process.js'); $this->getContext()->controller->addJs(__PS_BASE_URI__.$admin_webpath .'/themes/'.$bo_theme.'/js/jquery.fileupload-validate.js'); - $this->getContext()->controller->addJs('js/vendor/spin.js'); - $this->getContext()->controller->addJs('js/vendor/ladda.js'); + $this->getContext()->controller->addJs(__PS_BASE_URI__.'js/vendor/spin.js'); + $this->getContext()->controller->addJs(__PS_BASE_URI__.'js/vendor/ladda.js'); } if ($this->useAjax()) From a0373eed7a608affa746d707efe717ab897d5617 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 25 Nov 2013 17:39:46 +0100 Subject: [PATCH 2/2] [-] MO : Dateofdelivery Fix bug #PNM-1773 when a product has an available date --- modules/dateofdelivery/dateofdelivery.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/dateofdelivery/dateofdelivery.php b/modules/dateofdelivery/dateofdelivery.php index d54b2ed68..4524db85f 100644 --- a/modules/dateofdelivery/dateofdelivery.php +++ b/modules/dateofdelivery/dateofdelivery.php @@ -128,13 +128,12 @@ class DateOfDelivery extends Module $package = $package_list[$id_address][$id_package]; $oos = false; // For out of stock management foreach ($package['product_list'] as $product) - if (StockAvailable::getQuantityAvailableByProduct($product['id_product'], $product['id_product_attribute']) <= 0) + if (StockAvailable::getQuantityAvailableByProduct($product['id_product'], ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), (int)$this->context->shop->id) <= 0) { $oos = true; break; } - - $available_date = Product::getAvailableDate($product['id_product'], $product['id_product_attribute']); + $available_date = Product::getAvailableDate($product['id_product'], ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), (int)$this->context->shop->id); $date_range = $this->_getDatesOfDelivery($id_carrier, $oos, $available_date); if (is_null($date_from) || $date_from < $date_range[0]) { @@ -150,7 +149,6 @@ class DateOfDelivery extends Module } } } - $this->smarty->assign(array( 'nbPackages' => $params['cart']->getNbOfPackages(), 'datesDelivery' => $datesDelivery, @@ -708,4 +706,4 @@ class DateOfDelivery extends Module return $this->display(__FILE__, 'button.tpl').$helper->generateList($list, $fields_list).$this->display(__FILE__, 'button.tpl'); } -} +} \ No newline at end of file