From bff2844adf8cfd8ed7eabaafeacf9afab9fa3259 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 25 Jul 2013 14:50:35 +0200 Subject: [PATCH] [*] MO : Added customer and product object to hook sending email --- modules/mailalerts/MailAlert.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/mailalerts/MailAlert.php b/modules/mailalerts/MailAlert.php index 77f614380..a0124326d 100644 --- a/modules/mailalerts/MailAlert.php +++ b/modules/mailalerts/MailAlert.php @@ -188,8 +188,7 @@ class MailAlert extends ObjectModel file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html')) Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'customer_qty', Mail::l('Product available', $id_lang), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); - Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $link->getProductLink($product))); - + Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $link->getProductLink($product), 'customer' => $customer, 'product_obj' => $product)); self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute); } }