Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions mails/en/followup_1_0.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message from {shop_name}</title>


<style>
/****** responsive ********/
@media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}

@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 293px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}

}

@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
.table {width:450px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}


/* Mobile */

@media only screen and (max-device-width: 480px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}

.table-recap{width: 285px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>

</head>
<body style="background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;border:none;padding:7px 0">&nbsp;</td>
<td align="center" style="border:none;padding:7px 0">
<table class="table" style="width:100%;background-color:#fff">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333!important;border:none;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
<img src="{shop_logo}" alt="{shop_name}" />
</a>
</td>
</tr>

<tr>
<td align="center" class="titleblock" style="border:none;padding:7px 0">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Hi {firstname} {lastname},</span>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important;border:none">&nbsp;</td>
</tr>
<tr>
<td class="box" style="background-color:#fbfbfb;border:1px solid #d6d4d4!important;padding:10px!important">
<p data-html-only="1" style="margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;border-bottom:1px solid #d6d4d4!important;padding-bottom:10px">
Your cart at {shop_name} </p>
<span style="color:#777">
We noticed that during your last visit on {shop_name}, you did not complete the order you had started.<br /> <br />
Your cart has been saved, you can resume your order by visiting our shop: <span style="color:#333"><strong><a title="{shop_name}" href="{shop_url}" style="color:#337ff1">{shop_url}</a></strong></span><br /><br />
</span>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important;border:none">&nbsp;</td>
</tr>
<tr>
<td class="box" style="background-color:#fbfbfb;border:1px solid #d6d4d4!important;padding:10px!important">
<p style="margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;border-bottom:1px solid #d6d4d4!important;padding-bottom:10px">
Your {shop_name} login details </p>
</td>
</tr>

<tr>
<td class="space_footer" style="padding:0!important;border:none">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333!important;border:none;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> powered by <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;border:none;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>
16 changes: 16 additions & 0 deletions mails/en/followup_1_0.txt
Original file line number Diff line number Diff line change
@@ -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/]

19 changes: 12 additions & 7 deletions ps_reminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,21 @@ private function cancelledCart($count = false)
array(),
'Modules.Reminder.Admin')
);
if (false !== $voucher) {
// allowing to use 0 discount
//if (false !== $voucher) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented line ;)

$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,
Expand All @@ -253,7 +254,7 @@ private function cancelledCart($count = false)
(int)$email['id_customer'],
(int)$email['id_cart']
);
}
//}
}
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -749,7 +754,7 @@ public function renderForm()
array(),
'Modules.Reminder.Admin'
).'<br /><b>' . $this->context->shop->getBaseURL() .
'modules/followup/cron.php?secure_key=' .
'modules/ps_reminder/cron.php?secure_key=' .
Configuration::get('PS_FOLLOWUP_SECURE_KEY') . '</b></p>';
}

Expand Down Expand Up @@ -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'
),
Expand Down