From 3060c3a20eab0529aa9fd2f32ae6e66cb629575d Mon Sep 17 00:00:00 2001 From: AlexEven Date: Tue, 28 Oct 2014 17:56:14 +0100 Subject: [PATCH 1/7] // combinations.tpl: wording --- .../default/template/controllers/products/combinations.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/products/combinations.tpl b/admin-dev/themes/default/template/controllers/products/combinations.tpl index e26d5e469f9dc..3fca19097ac0f 100644 --- a/admin-dev/themes/default/template/controllers/products/combinations.tpl +++ b/admin-dev/themes/default/template/controllers/products/combinations.tpl @@ -302,7 +302,7 @@
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
From ed65f566587f8e4e4bc8c22e5cb745f7023eb47b Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 28 Oct 2014 18:15:28 +0100 Subject: [PATCH 2/7] [-] BO : Fix bug #PSCSX-3690, could not set combinations quantity in multishop --- controllers/admin/AdminImportController.php | 41 +++++++++++---------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index f9a4f5918192c..eab1628908e6a 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -2264,33 +2264,36 @@ public function attributeImport() StockAvailable::setProductDependsOnStock($product->id, $info['depends_on_stock'], null, $id_product_attribute); // This code allows us to set qty and disable depends on stock - if (isset($info['quantity']) && $info['depends_on_stock'] == 0) + if (isset($info['quantity']) && (int)$info['quantity']) { - if (Shop::isFeatureActive()) - foreach ($shops as $shop) - StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], (int)$shop); + // if depends on stock and quantity, add quantity to stock + if ($info['depends_on_stock'] == 1) + { + $stock_manager = StockManagerFactory::getManager(); + $price = str_replace(',', '.', $info['wholesale_price']); + if ($price == 0) + $price = 0.000001; + $price = round(floatval($price), 6); + $warehouse = new Warehouse($info['warehouse']); + if ($stock_manager->addProduct((int)$product->id, $id_product_attribute, $warehouse, (int)$info['quantity'], 1, $price, true)) + StockAvailable::synchronize((int)$product->id); + } else - StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], $this->context->shop->id); - } - // elseif enable depends on stock and quantity, add quantity to stock - elseif (isset($info['quantity']) && $info['depends_on_stock'] == 1) - { - // add stock - $stock_manager = StockManagerFactory::getManager(); - $price = str_replace(',', '.', $info['wholesale_price']); - if ($price == 0) - $price = 0.000001; - $price = round(floatval($price), 6); - $warehouse = new Warehouse($info['warehouse']); - if ($stock_manager->addProduct((int)$product->id, $id_product_attribute, $warehouse, (int)$info['quantity'], 1, $price, true)) - StockAvailable::synchronize((int)$product->id); + { + if (Shop::isFeatureActive()) + foreach ($id_shop_list as $shop) + StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], (int)$shop); + else + StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], $this->context->shop->id); + } + } } // if not depends_on_stock set, use normal qty else { if (Shop::isFeatureActive()) - foreach ($shops as $shop) + foreach ($id_shop_list as $shop) StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], (int)$shop); else StockAvailable::setQuantity((int)$product->id, $id_product_attribute, (int)$info['quantity'], $this->context->shop->id); From 51c8e14d95b381f41341f6997f4db425e0dc3991 Mon Sep 17 00:00:00 2001 From: AlexEven Date: Tue, 28 Oct 2014 18:39:06 +0100 Subject: [PATCH 3/7] // AdminImportController.php: wording --- controllers/admin/AdminImportController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index f9a4f5918192c..f39bc5bb011e3 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -135,7 +135,7 @@ public function __construct() 'minimal_quantity' => array('label' => $this->l('Minimal quantity')), 'weight' => array('label' => $this->l('Impact on weight')), 'default_on' => array('label' => $this->l('Default (0 = No, 1 = Yes)')), - 'available_date' => array('label' => $this->l('Combination available date')), + 'available_date' => array('label' => $this->l('Combination availability date')), 'image_position' => array( 'label' => $this->l('Choose among product images by position (1,2,3...)') ), @@ -257,7 +257,7 @@ public function __construct() 'available_now' => array('label' => $this->l('Text when in stock')), 'available_later' => array('label' => $this->l('Text when backorder allowed')), 'available_for_order' => array('label' => $this->l('Available for order (0 = No, 1 = Yes)')), - 'available_date' => array('label' => $this->l('Product available date')), + 'available_date' => array('label' => $this->l('Product availability date')), 'date_add' => array('label' => $this->l('Product creation date')), 'show_price' => array('label' => $this->l('Show price (0 = No, 1 = Yes)')), 'image' => array('label' => $this->l('Image URLs (x,y,z...)')), From 36b1fead9890409e35e44cae6eaccb29aeb618da Mon Sep 17 00:00:00 2001 From: AlexEven Date: Tue, 28 Oct 2014 18:41:00 +0100 Subject: [PATCH 4/7] // quantities.tpl: wording --- .../themes/default/template/controllers/products/quantities.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/products/quantities.tpl b/admin-dev/themes/default/template/controllers/products/quantities.tpl index 12504f340c054..d3d04e43b8315 100644 --- a/admin-dev/themes/default/template/controllers/products/quantities.tpl +++ b/admin-dev/themes/default/template/controllers/products/quantities.tpl @@ -225,7 +225,7 @@
{include file="controllers/products/multishop/checkbox.tpl" field="available_date" type="default"}
From c8c305ba9408a61b464f2c4e49455f932cca2ba7 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Tue, 28 Oct 2014 19:03:25 +0100 Subject: [PATCH 5/7] // Folow up https://github.com/PrestaShop/PrestaShop/commit/d78ec091237a48fe3b20038c13570d0233c85576#commitcomment-8336489 --- classes/ImageManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/ImageManager.php b/classes/ImageManager.php index 33f594ac272df..6df260c37b1a6 100644 --- a/classes/ImageManager.php +++ b/classes/ImageManager.php @@ -150,8 +150,8 @@ public static function resize($src_file, $dst_file, $dst_width = null, $dst_heig switch ($exif['Orientation']) { case 3: - $src_width = $tmp_height; - $src_height = $tmp_width; + $src_width = $tmp_width; + $src_height = $tmp_height; $src_image = imagerotate($src_image, 180, 0); break; From 2389eba935e1c1dc5b0a4797bdf6d0224b65a228 Mon Sep 17 00:00:00 2001 From: Francois Gaillard Date: Wed, 29 Oct 2014 01:33:48 +0100 Subject: [PATCH 6/7] // Submodules updated --- modules/dashgoals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dashgoals b/modules/dashgoals index a8f74e1d04ba6..19af9b9afb307 160000 --- a/modules/dashgoals +++ b/modules/dashgoals @@ -1 +1 @@ -Subproject commit a8f74e1d04ba6dc48426d6ed80e83946c1823fb4 +Subproject commit 19af9b9afb307d8d47a89feeffdf091fbe6fd8e9 From e1b8b747ea000d800edc5176995ecda4848a2a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Wed, 29 Oct 2014 10:34:01 +0100 Subject: [PATCH 7/7] // specific price reduction displayed in cart --- controllers/front/ParentOrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index cd107bbcfc537..ac67bf6784667 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -317,7 +317,7 @@ protected function _assignSummaryInformations() $product['id_product'], !Product::getTaxCalculationMethod(), $product['id_product_attribute'], - 2, + _PS_PRICE_COMPUTE_PRECISION_, null, false, false,