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}
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
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));
}
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()
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}
-
+
{/if}
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',