From df405abfe9d99664282f5b9b079c3ab1a7498bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 3 Jan 2013 11:38:39 +0100 Subject: [PATCH 1/3] [-] BO: Fix #PSCFV-6118 display of product image for git on BackOffice orders --- controllers/admin/AdminCartsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 959cfdc43..e9b003f07 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -570,7 +570,7 @@ class AdminCartsControllerCore extends AdminController if (isset($summary['gift_products']) && count($summary['gift_products'])) foreach ($summary['gift_products'] as &$product) { - $product['image_link'] = $this->context->link->getImageLink($product['link_rewrite'], $product['id_image'], 'small'); + $product['image_link'] = $this->context->link->getImageLink($product['link_rewrite'], $product['id_image'], 'small_default'); if (!isset($product['attributes_small'])) $product['attributes_small'] = ''; } From b10b53028f5971a416557442efcfc3c51b2ee72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 3 Jan 2013 12:08:29 +0100 Subject: [PATCH 2/3] [-] FO: Fix #PSCFV-6159 order way of best sales --- classes/ProductSale.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/ProductSale.php b/classes/ProductSale.php index bd9046fad..45b4f9469 100644 --- a/classes/ProductSale.php +++ b/classes/ProductSale.php @@ -68,7 +68,7 @@ class ProductSaleCore $final_order_by = $order_by; if (empty($order_by) || $order_by == 'position' || $order_by = 'price') $order_by = 'sales'; - if (empty($order_way)) $order_way = 'DESC'; + if (empty($order_way) || $order_by == 'sales') $order_way = 'DESC'; $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); From 8d7196daf3b39d280c631882f0e3ebe473233d07 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 3 Jan 2013 15:18:00 +0100 Subject: [PATCH 3/3] [-] BO : fixed import images --- controllers/admin/AdminImportController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index f3b3fb68d..1aea61201 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -642,12 +642,12 @@ class AdminImportControllerCore extends AdminController if (is_null($separator) || trim($separator) == '') $separator = ','; - do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid)); - $tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field); - $fd = fopen($temp, 'r'); + do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path)); + file_put_contents($uniqid_path, $field); + $fd = fopen($uniqid_path, 'r'); $tab = fgetcsv($fd, MAX_LINE_SIZE, $separator); fclose($fd); - unlink($tmp_file); + unlink($uniqid_path); if (empty($tab) || (!is_array($tab))) return array();