diff --git a/mails/en/followup_1_0.html b/mails/en/followup_1_0.html
new file mode 100644
index 0000000..cb17e57
--- /dev/null
+++ b/mails/en/followup_1_0.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+ Message from {shop_name}
+
+
+
+
+
+
+
+
+ | |
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+ Hi {firstname} {lastname},
+ |
+
+
+
+
+
+ |
+
+ Your cart at {shop_name}
+
+ We noticed that during your last visit on {shop_name}, you did not complete the order you had started.
+ Your cart has been saved, you can resume your order by visiting our shop: {shop_url}
+
+ |
+
+
+
+
+
+ |
+
+ Your {shop_name} login details
+ |
+
+
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
\ No newline at end of file
diff --git a/mails/en/followup_1_0.txt b/mails/en/followup_1_0.txt
new file mode 100644
index 0000000..9adf004
--- /dev/null
+++ b/mails/en/followup_1_0.txt
@@ -0,0 +1,16 @@
+
+[{shop_url}]
+
+Hi {firstname} {lastname},
+
+We noticed that during your last visit on {shop_name}, you did not
+complete the order you had started.
+
+Your cart has been saved, you can resume your order by visiting our
+shop: {shop_name} [{shop_url}]
+
+Your {shop_name} login details
+
+{shop_name} [{shop_url}] powered by
+PrestaShop(tm) [http://www.prestashop.com/]
+
diff --git a/ps_reminder.php b/ps_reminder.php
index 14df5cc..7ecb3f8 100644
--- a/ps_reminder.php
+++ b/ps_reminder.php
@@ -222,20 +222,21 @@ private function cancelledCart($count = false)
array(),
'Modules.Reminder.Admin')
);
- if (false !== $voucher) {
+ // allowing to use 0 discount
+ //if (false !== $voucher) {
$template_vars = array(
'{email}' => $email['email'],
'{lastname}' => $email['lastname'],
'{firstname}' => $email['firstname'],
'{amount}' => $conf['PS_FOLLOW_UP_AMOUNT_1'],
'{days}' => $conf['PS_FOLLOW_UP_DAYS_1'],
- '{voucher_num}' => $voucher->code
+ '{voucher_num}' => $voucher ? $voucher->code : null
);
Mail::Send(
(int)$email['id_lang'],
- 'followup_1',
+ $voucher ? 'followup_1' : 'followup_1_0',
Mail::l(
- 'Your cart and your discount',
+ $voucher ? 'Your cart and your discount' : 'Your cart',
(int)$email['id_lang']
),
$template_vars,
@@ -253,7 +254,7 @@ private function cancelledCart($count = false)
(int)$email['id_customer'],
(int)$email['id_cart']
);
- }
+ //}
}
}
@@ -597,6 +598,10 @@ private function createDiscount(
$date_validity,
$description
) {
+ if ($amount <= 0) {
+ return false;
+ }
+
$cart_rule = new CartRule();
$cart_rule->reduction_percent = (float)$amount;
$cart_rule->id_customer = (int)$id_customer;
@@ -749,7 +754,7 @@ public function renderForm()
array(),
'Modules.Reminder.Admin'
).'
' . $this->context->shop->getBaseURL() .
- 'modules/followup/cron.php?secure_key=' .
+ 'modules/ps_reminder/cron.php?secure_key=' .
Configuration::get('PS_FOLLOWUP_SECURE_KEY') . '';
}
@@ -782,7 +787,7 @@ public function renderForm()
'icon' => 'icon-cogs',
),
'description' => $this->trans(
- 'For each cancelled cart (with no order), generate a discount and send it to the customer.',
+ 'For each canceled cart (with no order), generate a discount and send it to the customer. Set it to 0% to disable the discount and just send a reminder email.',
array(),
'Modules.Reminder.Admin'
),