diff --git a/MailAlert.php b/MailAlert.php index 9649003..06ce2fd 100644 --- a/MailAlert.php +++ b/MailAlert.php @@ -90,7 +90,7 @@ public static function customerHasNotification($id_customer, $id_product, $id_pr return count(Db::getInstance((bool) _PS_USE_SQL_SLAVE_)->executeS($sql)); } - public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute, $id_shop, $notification_sent) + public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute, $id_shop = null, $notification_sent = true) { $sql = 'UPDATE `' . _DB_PREFIX_ . self::$definition['table'] . '` set `deleted` = 1, date_upd = NOW()' . ($notification_sent ? ', `notification_sent` = NOW()' : '') . diff --git a/upgrade/upgrade-2.3.4.php b/upgrade/upgrade-2.4.1.php similarity index 97% rename from upgrade/upgrade-2.3.4.php rename to upgrade/upgrade-2.4.1.php index f043400..202dd28 100755 --- a/upgrade/upgrade-2.3.4.php +++ b/upgrade/upgrade-2.4.1.php @@ -23,7 +23,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA */ -function upgrade_module_2_3_4() +function upgrade_module_2_4_1() { $result = Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'mailalert_customer_oos` ADD `date_add` DATETIME NOT NULL, ADD `date_upd` DATETIME NOT NULL;'); $result = $result && Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'mailalert_customer_oos` ADD `deleted` TINYINT NOT NULL DEFAULT 0, ADD `notification_sent` DATETIME NULL DEFAULT NULL, ADD INDEX (`deleted`)');