Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap

Conflicts:
	admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl
	admin-dev/themes/default/template/controllers/modules/list.tpl
	admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/products/informations.tpl
	admin-dev/themes/default/template/controllers/products/prices.tpl
	admin-dev/themes/default/template/controllers/products/suppliers.tpl
	admin-dev/themes/default/template/helpers/form/form.tpl
	admin-dev/themes/default/template/toolbar.tpl
	classes/helper/HelperList.php
	controllers/admin/AdminGroupsController.php
	controllers/admin/AdminManufacturersController.php
This commit is contained in:
Kevin Granger committed 2013-09-30 11:01:23 +02:00
commit 8ed77030aa
84 files changed
+741 -17517

No files matched your search

+7 -3
View File
@@ -54,7 +54,7 @@ class MailAlert extends ObjectModel
),
);
public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null, $id_lang = null)
public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null, $id_lang = null, $guest_email = '')
{
if ($id_shop == null)
$id_shop = Context::getContext()->shop->id;
@@ -64,11 +64,15 @@ class MailAlert extends ObjectModel
$customer = new Customer($id_customer);
$customer_email = $customer->email;
$guest_email = pSQL($guest_email);
$id_customer = (int)$id_customer;
$customer_email = pSQL($customer_email);
$where = $id_customer == 0 ? "customer_email = '$guest_email'" : "(id_customer=$id_customer OR customer_email='$customer_email')";
$sql = '
SELECT *
FROM `'._DB_PREFIX_.self::$definition['table'].'`
WHERE (`id_customer` = '.(int)$id_customer.' OR `customer_email` = \''.pSQL($customer_email).'\')
WHERE '.$where.'
AND `id_product` = '.(int)$id_product.'
AND `id_product_attribute` = '.(int)$id_product_attribute.'
AND `id_shop` = '.(int)$id_shop;
@@ -97,7 +97,7 @@ class MailalertsActionsModuleFrontController extends ModuleFrontController
$id_lang = (int)$context->language->id;
$product = new Product($id_product, false, $id_lang, $id_shop, $context);
$mailAlert = MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop);
$mailAlert = MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop, null, $customer_email);
if ($mailAlert)
die('2');