From b401ceb9d9e8b88f525f803346b8f91641db242d Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 08:57:15 +0200 Subject: [PATCH 1/6] [-] MO : do not truncate order return state in pscleaner #PSCFV-9431 --- modules/pscleaner/pscleaner.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/pscleaner/pscleaner.php b/modules/pscleaner/pscleaner.php index 969c196f3..c2f630c74 100644 --- a/modules/pscleaner/pscleaner.php +++ b/modules/pscleaner/pscleaner.php @@ -475,8 +475,6 @@ class PSCleaner extends Module 'order_payment', 'order_return', 'order_return_detail', - 'order_return_state', - 'order_return_state_lang', 'order_slip', 'order_slip_detail', 'page', From a4e6ddf29c4d9f7c66af1fc3eb1cf3aceb27982f Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 09:42:34 +0200 Subject: [PATCH 2/6] [*] MO : blocklayered optimization --- modules/blocklayered/blocklayered.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index 04f9fbeb9..47ed3bb19 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -2508,6 +2508,7 @@ class BlockLayered extends Module else { $n = (int)Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')); + $nb_day_new_product = (Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20); $join = ''; if (version_compare(_PS_VERSION_,'1.5','>')) $join = Shop::addSqlAssociation('product', 'p'); @@ -2520,12 +2521,12 @@ class BlockLayered extends Module i.id_image, il.legend, m.name manufacturer_name, - DATEDIFF('.$alias_where.'.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new + DATEDIFF('.$alias_where.'.`date_add`, DATE_SUB(NOW(), INTERVAL '.(int)$nb_day_new_product.' DAY)) > 0 AS new FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product` '.$join.' - LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').' AND pl.id_lang = '.(int)$cookie->id_lang.') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1) LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).') LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) @@ -2533,9 +2534,9 @@ class BlockLayered extends Module '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' AND c.active = 1 - AND pl.id_lang = '.(int)$cookie->id_lang.' - AND p.id_product IN ('.implode(',', $product_id_list).')' - .' GROUP BY p.id_product ORDER BY '.Tools::getProductsOrder('by', Tools::getValue('orderby'), true).' '.Tools::getProductsOrder('way', Tools::getValue('orderway')). + AND p.id_product IN ('.implode(',', $product_id_list).') + GROUP BY cp.id_product + ORDER BY '.Tools::getProductsOrder('by', Tools::getValue('orderby'), true).' '.Tools::getProductsOrder('way', Tools::getValue('orderway')). ' LIMIT '.(((int)$this->page - 1) * $n.','.$n)); } From e4535e892d5e7662c84a6b3c28efa9be84dbdda1 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 10:31:39 +0200 Subject: [PATCH 3/6] [-] MO : fixed editorial issue when the entity does not exist yet for a shop #PSCFV-9442 --- modules/editorial/EditorialClass.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/editorial/EditorialClass.php b/modules/editorial/EditorialClass.php index ca0b4db60..5b3d05349 100755 --- a/modules/editorial/EditorialClass.php +++ b/modules/editorial/EditorialClass.php @@ -68,10 +68,7 @@ class EditorialClass extends ObjectModel static public function getByIdShop($id_shop) { $id = Db::getInstance()->getValue('SELECT `id_editorial` FROM `'._DB_PREFIX_.'editorial` WHERE `id_shop` ='.(int)$id_shop); - if ($id) - return new EditorialClass((int)$id); - else - return false; + return new EditorialClass($id); } public function copyFromPost() From d6b884b7b57811925c9992bed4fc0deaac6f9440 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 10:34:35 +0200 Subject: [PATCH 4/6] [-] MO : removed doubled "/" in homeslider template #PSCFV-9439 --- modules/homeslider/homeslider.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/homeslider/homeslider.tpl b/modules/homeslider/homeslider.tpl index e2ba1b74a..fba02d589 100644 --- a/modules/homeslider/homeslider.tpl +++ b/modules/homeslider/homeslider.tpl @@ -46,7 +46,7 @@ var homeslider_pause = {$homeslider.pause}; {if $slide.active}
  • - {$slide.legend|escape:'htmlall':'UTF-8'} + {$slide.legend|escape:'htmlall':'UTF-8'}
  • {/if} From babfbaa2d2da9052148ce265ce41984ba7b79325 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 11:00:01 +0200 Subject: [PATCH 5/6] // Added missing space in installer --- install-dev/langs/pl/language.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-dev/langs/pl/language.xml b/install-dev/langs/pl/language.xml index 39b5fd3da..c4fc47528 100644 --- a/install-dev/langs/pl/language.xml +++ b/install-dev/langs/pl/language.xml @@ -1,6 +1,6 @@ - + pl m/j/Y m/j/Y H:i:s From ecf59957bab931d6a1f08db5ade0d32490617d31 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 13 Jun 2013 11:18:03 +0200 Subject: [PATCH 6/6] [-] FO : fixed pdf template #PSCFV-9430 --- .../default/template/controllers/orders/helpers/view/view.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index e1e546126..9fc61567f 100755 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -59,7 +59,7 @@ {assign var="hook_invoice" value={hook h="displayInvoice" id_order=$order->id}} {if ($hook_invoice)} -
    {$hook_invoice}

    '; +
    {$hook_invoice}

    {/if}