From 69555942904452f5f8558dcaa9a94a3f6dce2935 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Mon, 24 Jun 2013 11:43:20 +0200 Subject: [PATCH 1/3] [-] FO : fixed bug #PSCFV-9007 - Best sales query has ambigious column when sorted on date_add --- classes/ProductSale.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/ProductSale.php b/classes/ProductSale.php index 921f9d7b8..d264a1ef9 100644 --- a/classes/ProductSale.php +++ b/classes/ProductSale.php @@ -71,7 +71,11 @@ class ProductSaleCore $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); $interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; - + + $prefix = ''; + if ($order_by == 'date_add') + $prefix = 'p.'; + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, @@ -104,7 +108,7 @@ class ProductSaleCore WHERE cg.`id_group` '.$sql_groups.' ) GROUP BY product_shop.id_product - ORDER BY `'.pSQL($order_by).'` '.pSQL($order_way).' + ORDER BY '.$prefix.'`'.pSQL($order_by).'` '.pSQL($order_way).' LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); From 533582091542a733afc8586bfd24b45ab883ec2b Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 24 Jun 2013 11:51:00 +0200 Subject: [PATCH 2/3] // Fixed sessions/cookies // Added support iframe --- install-dev/classes/session.php | 8 ++++++-- install-dev/theme/view.css | 13 ++++++------- install-dev/theme/views/header.phtml | 8 ++++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/install-dev/classes/session.php b/install-dev/classes/session.php index 3002ca3d6..67bbcf9ab 100644 --- a/install-dev/classes/session.php +++ b/install-dev/classes/session.php @@ -43,13 +43,17 @@ class InstallSession public function __construct() { session_name('install_'.md5(__PS_BASE_URI__)); - if (!session_start() + if (!($session_started = session_start()) || (!isset($_SESSION['session_mode']) && (isset($_POST['submitNext']) || isset($_POST['submitPrevious']) || isset($_POST['language'])))) { InstallSession::$_cookie_mode = true; InstallSession::$_cookie = new Cookie('ps_install', null, time() + 7200, null, true); } - $_SESSION['session_mode'] = 'session'; + if ($session_started && !isset($_SESSION['session_mode'])) + { + $_SESSION['session_mode'] = 'session'; + session_write_close(); + } } public function clean() diff --git a/install-dev/theme/view.css b/install-dev/theme/view.css index 3ecd4f8e8..592fab40a 100644 --- a/install-dev/theme/view.css +++ b/install-dev/theme/view.css @@ -43,12 +43,11 @@ a {cursor:pointer;} width:990px; background :#fff; } - #header { - padding:6px 16px 16px 16px; - height:68px;/* 90 */ - background:#394049; - } - +#header { + padding:6px 16px 16px 16px; + height:50px; + background:#394049; +} #loaderSpace{ display:none; z-index: 100; @@ -407,7 +406,7 @@ ul#footer a:link, ul#footer a:active, ul#footer a:visited { } .sheet .contentTitle { position:absolute; - top:90px; + top:72px; left:0; padding:15px 25px 10px 38px; height:28px;/* 53 */ diff --git a/install-dev/theme/views/header.phtml b/install-dev/theme/views/header.phtml index 43119205f..f5791de8c 100644 --- a/install-dev/theme/views/header.phtml +++ b/install-dev/theme/views/header.phtml @@ -39,11 +39,13 @@
  • l('Support') ?>
  • l('Documentation') ?>
  • l('Blog') ?>
  • + @@ -69,6 +71,12 @@ + + + From 1d5e34cb3774d3ea353b246e7091d85da6ab1629 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 24 Jun 2013 13:41:40 +0200 Subject: [PATCH 3/3] // Installer improvements --- install-dev/theme/view.css | 4 ++-- install-dev/theme/views/header.phtml | 2 +- install-dev/theme/views/license.phtml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install-dev/theme/view.css b/install-dev/theme/view.css index 592fab40a..e9c96d71f 100644 --- a/install-dev/theme/view.css +++ b/install-dev/theme/view.css @@ -76,7 +76,7 @@ div#leftpannel{ div#sheets { float:left; margin-top:65px; - min-height:400px; + min-height:360px; width:700px; background-color:#fff; } @@ -92,7 +92,7 @@ div#leftpannel{ div#buttons{ clear:both; margin:0 0 0 295px; - height:70px; + height:60px; width:650px; } * html div#buttons { diff --git a/install-dev/theme/views/header.phtml b/install-dev/theme/views/header.phtml index f5791de8c..b80b0d469 100644 --- a/install-dev/theme/views/header.phtml +++ b/install-dev/theme/views/header.phtml @@ -93,5 +93,5 @@ \ No newline at end of file diff --git a/install-dev/theme/views/license.phtml b/install-dev/theme/views/license.phtml index f14f00220..e71c76635 100644 --- a/install-dev/theme/views/license.phtml +++ b/install-dev/theme/views/license.phtml @@ -10,9 +10,11 @@
    session->licence_agrement): ?>checked="checked" />
    +
    displayTemplate('footer') ?> \ No newline at end of file