[-] MO : #PSCFV-2868 - Fix addslashes
This commit is contained in:
@@ -44,18 +44,18 @@ class MailAlert extends ObjectModel
|
||||
'table' => 'mailalert_customer_oos',
|
||||
'primary' => 'id_customer',
|
||||
'fields' => array(
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'customer_email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true),
|
||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true)
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'customer_email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true),
|
||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true)
|
||||
),
|
||||
);
|
||||
|
||||
public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null)
|
||||
{
|
||||
if ($id_shop == null)
|
||||
$id_shop = Context::getContext()->shop->id;
|
||||
$id_shop = Context::getContext()->shop->id;
|
||||
|
||||
$customer = new Customer($id_customer);
|
||||
$customer_email = $customer->email;
|
||||
@@ -109,7 +109,7 @@ class MailAlert extends ObjectModel
|
||||
continue;
|
||||
|
||||
if (isset($products[$i]['id_product_attribute']) &&
|
||||
Validate::isUnsignedInt($products[$i]['id_product_attribute']))
|
||||
Validate::isUnsignedInt($products[$i]['id_product_attribute']))
|
||||
{
|
||||
$attributes = self::getProductAttributeCombination($products[$i]['id_product_attribute'], $id_lang);
|
||||
$products[$i]['attributes_small'] = '';
|
||||
@@ -187,7 +187,7 @@ class MailAlert extends ObjectModel
|
||||
$iso = Language::getIsoById($id_lang);
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.txt') &&
|
||||
file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html'))
|
||||
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)));
|
||||
|
||||
Reference in New Issue
Block a user