From 82cb9f8ba9a9e45fc6ab033b43c211adbd9d3c41 Mon Sep 17 00:00:00 2001 From: emily-d Date: Wed, 23 Jan 2013 22:30:18 +0100 Subject: [PATCH 01/40] [-] FO : PS_SSL_ENABLED and mod_rewrite yields a 301 error (Too Many Redirects) on pages served by https. See http://www.prestashop.com/forums/topic/217724-activer-le-ssl-url-simplifiee-mod-rewrite-ne-marche-pas-erreur-301-sur-les-pages-commandes for more info. --- classes/Tools.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/Tools.php b/classes/Tools.php index 8ec0b5ac0..b8c511c8a 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -267,6 +267,9 @@ class ToolsCore // $_SERVER['SSL'] exists only in some specific configuration if (isset($_SERVER['SSL'])) return ($_SERVER['SSL'] == 1 || strtolower($_SERVER['SSL']) == 'on'); + // $_SERVER['REDIRECT_HTTPS'] exists only in some specific configuration (e.g. Gandi's simple hosting) + if (isset($_SERVER['REDIRECT_HTTPS'])) + return ($_SERVER['REDIRECT_HTTPS'] == 1 || strtolower($_SERVER['REDIRECT_HTTPS']) == 'on'); return false; } From df1b8efbc29b8824b1c3a7694460e4ab9721d5ef Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Thu, 18 Apr 2013 14:45:52 +0300 Subject: [PATCH 02/40] [-] MO: feeder / RSS Valid --- modules/feeder/rss.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/feeder/rss.php b/modules/feeder/rss.php index fad90e212..00874b76f 100644 --- a/modules/feeder/rss.php +++ b/modules/feeder/rss.php @@ -34,6 +34,7 @@ $id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('i $products = Product::getProducts((int)Context::getContext()->language->id, 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); $currency = new Currency((int)Context::getContext()->currency->id); $affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : ''); +$metas = Meta::getMetaByPage('index', (int)Context::getContext()->language->id); // Send feed header("Content-Type:text/xml; charset=utf-8"); @@ -42,8 +43,9 @@ echo ''."\n"; <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> + ]]> - + PrestaShop language->iso_code; ?> From 757f740037d70724e3a4cd31ed1f91a71f3011a1 Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Tue, 30 Apr 2013 20:40:03 +0200 Subject: [PATCH 03/40] // fix --- modules/feeder/rss.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/feeder/rss.php b/modules/feeder/rss.php index 00874b76f..caa32a3c8 100644 --- a/modules/feeder/rss.php +++ b/modules/feeder/rss.php @@ -43,7 +43,7 @@ echo ''."\n"; <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> - ]]>]]> PrestaShop From 4346d9e57c8f1fe7339e8bcd3cd2c7fc8ec61828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Gaulu=C3=A9?= Date: Mon, 6 May 2013 00:32:16 +0200 Subject: [PATCH 04/40] [*] FO : AuthController can now have its own template --- controllers/front/AuthController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index f5b8563b4..8eec13284 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -139,6 +139,9 @@ class AuthControllerCore extends FrontController 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop') )); + // Just set $this->template value here in case it's used by Ajax + $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); + if ($this->ajax) { // Call a hook to display more information on form @@ -150,12 +153,11 @@ class AuthControllerCore extends FrontController $return = array( 'hasError' => !empty($this->errors), 'errors' => $this->errors, - 'page' => $this->context->smarty->fetch(_PS_THEME_DIR_.'authentication.tpl'), + 'page' => $this->context->smarty->fetch($this->template), 'token' => Tools::getToken(false) ); die(Tools::jsonEncode($return)); } - $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); } /** From 448b8bad023ad9b8b5b15c44767d86d67e2105c4 Mon Sep 17 00:00:00 2001 From: AntonLejon Date: Mon, 6 May 2013 12:14:11 +0300 Subject: [PATCH 05/40] [*] MO: blockcart animation optimization The animated element would not be removed upon the animation being finished. This made the site slow and unresponsive if the animated image was heavy (eg. a transparent png) and added to cart many times without reloading the page. This addition makes the animation behave as expected also when performing it multiple times. --- modules/blockcart/ajax-cart.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index c42dc72cf..8641931c5 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -232,6 +232,7 @@ var ajaxCart = { .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) .fadeOut(100, function() { ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + $(this).remove(); }); } else From 83a1ea548812abbc89d523e56aa56391a8e2f0ae Mon Sep 17 00:00:00 2001 From: AntonLejon Date: Thu, 9 May 2013 00:53:06 +0300 Subject: [PATCH 06/40] [-] MO: blockcart ajax cart product insert missing html class Added the same HTML class as the other product names have in the ajax cart. Perhaps it would be nice to add an added_from_ajax as well in case you would want to differ between the newly added items and previously added ones? Another potential issue is on line 445 where there is no space after the insert. If Prestashop is set to minify the normal page, this is correct, otherwise there will be a space missing. --- modules/blockcart/ajax-cart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index c42dc72cf..073d95705 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -443,7 +443,7 @@ var ajaxCart = { var content = '