diff --git a/admin-dev/themes/default/template/controllers/products/images.tpl b/admin-dev/themes/default/template/controllers/products/images.tpl
index a686c8ec8..6c5cc4368 100644
--- a/admin-dev/themes/default/template/controllers/products/images.tpl
+++ b/admin-dev/themes/default/template/controllers/products/images.tpl
@@ -78,7 +78,7 @@
-
+
|
@@ -313,12 +313,13 @@
{
line = $("#lineType").html();
line = line.replace(/image_id/g, id);
- line = line.replace(/en-default/g, path);
- line = line.replace(/image_path/g, path);
+ line = line.replace(/[a-z]{2}-default/g, path);
+ line = line.replace(/image_path/g, path);
line = line.replace(/image_position/g, position);
line = line.replace(/blank/g, cover);
line = line.replace(/ |
/gi, "");
line = line.replace(/<\/tbody>/gi, "");
+
if (shops != false)
{
$.each(shops, function(key, value){
@@ -326,8 +327,10 @@
line = line.replace('id="' + key + '' + id + '"','id="' + key + '' + id + '" checked=checked');
});
}
+
$("#imageList").append(line);
}
+
$('.fancybox').fancybox();
});
{/literal}
diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php
index 88ebd4b4f..52c090097 100755
--- a/classes/controller/FrontController.php
+++ b/classes/controller/FrontController.php
@@ -849,8 +849,8 @@ class FrontControllerCore extends Controller
$range = 2; /* how many pages around page selected */
- if ($this->p < 0)
- $this->p = 0;
+ if ($this->p < 1)
+ $this->p = 1;
if (isset($this->context->cookie->nb_item_per_page) && $this->n != $this->context->cookie->nb_item_per_page && in_array($this->n, $nArray))
$this->context->cookie->nb_item_per_page = $this->n;
diff --git a/classes/module/Module.php b/classes/module/Module.php
index b521e0fe4..225f492bf 100644
--- a/classes/module/Module.php
+++ b/classes/module/Module.php
@@ -1354,7 +1354,7 @@ abstract class ModuleCore
elseif (isset($context->customer))
{
$groups = $context->customer->getGroups();
- if (empty($groups))
+ if (!count($groups))
$groups = array(Configuration::get('PS_UNIDENTIFIED_GROUP'));
}
@@ -1377,7 +1377,7 @@ abstract class ModuleCore
'.(isset($billing) && $frontend ? 'AND mc.id_country = '.(int)$billing->id_country : '').'
AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).'
AND hm.id_shop IN('.implode(', ', $list).')
- '.(count($groups) && $frontend ? 'AND (mg.`id_group` IN('.implode(', ', $groups).'))' : '').$paypal_condition.'
+ '.((count($groups) && $frontend) ? 'AND (mg.`id_group` IN ('.implode(', ', $groups).'))' : '').$paypal_condition.'
GROUP BY hm.id_hook, hm.id_module
ORDER BY hm.`position`, m.`name` DESC');
}
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index 614f386c2..91aac1d37 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -3659,12 +3659,15 @@ class AdminProductsControllerCore extends AdminController
$current_shop_id = (int)$this->context->shop->id;
else
$current_shop_id = 0;
+
+ $languages = Language::getLanguages(true);
$data->assign(array(
'countImages' => $count_images,
'id_product' => (int)Tools::getValue('id_product'),
'id_category_default' => (int)$this->_category->id,
'images' => $images,
+ 'iso_lang' => $languages[0]['iso_code'],
'token' => $this->token,
'table' => $this->table,
'max_image_size' => $this->max_image_size / 1024 / 1024,
diff --git a/install-dev/data/xml/hook.xml b/install-dev/data/xml/hook.xml
index 1139431f2..005284227 100644
--- a/install-dev/data/xml/hook.xml
+++ b/install-dev/data/xml/hook.xml
@@ -86,7 +86,7 @@
displayCustomerAccountCustomer account displayed in Front OfficeThis hook displays new elements on the customer account page
- actionOrderSlipAddOrder slip creationThis hook is called when a product's quantity is modified
+ actionOrderSlipAddOrder slip creationThis hook is called when a new credit slip is added regarding client order
displayProductTabTabs on product pageThis hook is called on the product page's tab
diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql
index 934492867..152e75ea9 100644
--- a/install-dev/upgrade/sql/1.5.5.0.sql
+++ b/install-dev/upgrade/sql/1.5.5.0.sql
@@ -24,3 +24,5 @@ ALTER TABLE `PREFIX_log` ADD `id_employee` INT(10) UNSIGNED NULL AFTER `object_i
SET @id_parent = (SELECT IFNULL(id_tab, 1) FROM `PREFIX_tab` WHERE `class_name` = 'AdminPriceRule' LIMIT 1);
UPDATE `PREFIX_tab` SET id_parent = @id_parent WHERE `id_parent` = 1 AND `class_name` = 'AdminMarketing' LIMIT 1;
+
+UPDATE `PREFIX_hook` SET `description` = 'This hook is called when a new credit slip is added regarding client order' WHERE `name` = 'actionOrderSlipAdd';
\ No newline at end of file
diff --git a/modules/blockmyaccountfooter/config.xml b/modules/blockmyaccountfooter/config.xml
index 0266fa7ae..aa3e350ae 100644
--- a/modules/blockmyaccountfooter/config.xml
+++ b/modules/blockmyaccountfooter/config.xml
@@ -2,7 +2,7 @@
blockmyaccountfooter
-
+
diff --git a/modules/cheque/config.xml b/modules/cheque/config.xml
index dd5655265..e49cd3934 100755
--- a/modules/cheque/config.xml
+++ b/modules/cheque/config.xml
@@ -1,7 +1,7 @@
cheque
-
+
diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php
index 23b3f4c52..ddd93c921 100644
--- a/modules/statsforecast/statsforecast.php
+++ b/modules/statsforecast/statsforecast.php
@@ -470,7 +470,7 @@ class StatsForecast extends Module
$where = ' AND co.id_zone = '.(int)$this->context->cookie->stats_id_zone.' ';
}
- $sql = 'SELECT SUM(od.`product_price` * od.`product_quantity` / o.conversion_rate) as orderSum, COUNT(*) AS orderQty, cl.name, AVG(od.`product_price` / o.conversion_rate) as priveAvg
+ $sql = 'SELECT SUM(od.`product_price` * od.`product_quantity` / o.conversion_rate) as orderSum, SUM(od.product_quantity) as orderQty, cl.name, AVG(od.`product_price` / o.conversion_rate) as priveAvg
FROM `'._DB_PREFIX_.'orders` o
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order
LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = od.product_id