Update
This commit is contained in:
parent
c41826bb1b
commit
2554533e09
@ -235,7 +235,7 @@ func (s *memberSvc) sendWelcomeEmail(
|
||||
welcomeData := map[string]interface{}{
|
||||
"UserName": customer.Name,
|
||||
"MemberID": customer.CustomerID,
|
||||
"PointsName": "PoinLo",
|
||||
"PointsName": "ELP",
|
||||
"PointsBalance": customer.Points,
|
||||
"RedeemLink": "https://enaklo.co.id/redeem",
|
||||
"CurrentDate": time.Now().Format("01-20006"),
|
||||
|
||||
@ -51,7 +51,7 @@ func (s *orderSvc) processPostOrderActions(
|
||||
}
|
||||
|
||||
if order.CustomerID != nil && *order.CustomerID > 0 {
|
||||
err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total))
|
||||
err = s.addCustomerPoints(ctx, *order.CustomerID, int(order.Total/1000))
|
||||
if err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when adding points", zap.Error(err))
|
||||
}
|
||||
@ -136,8 +136,9 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
|
||||
|
||||
emailData := map[string]interface{}{
|
||||
"UserName": customer.Name,
|
||||
"PointsName": "PoinLo",
|
||||
"PointsBalance": "20",
|
||||
"PointsName": "ELP",
|
||||
"PointsBalance": int(order.Total / 1000),
|
||||
"NewPoints": int(order.Total / 1000),
|
||||
"RedeemLink": "enaklo.co.id",
|
||||
"BranchName": branchName,
|
||||
"TransactionNumber": order.ID,
|
||||
@ -146,12 +147,13 @@ func (s *orderSvc) sendTransactionReceipt(ctx mycontext.Context, order *entity.O
|
||||
"Items": itemsData,
|
||||
"TotalPayment": fmt.Sprintf("Rp %s", formatCurrency(order.Total)),
|
||||
"ViewTransactionLink": viewTransactionLink,
|
||||
"ExpiryDate": order.CreatedAt.Format("02 January 2006"),
|
||||
}
|
||||
|
||||
return s.notification.SendEmailTransactional(ctx, entity.SendEmailNotificationParam{
|
||||
Sender: "noreply@enaklo.co.id",
|
||||
Recipient: customer.Email,
|
||||
Subject: "Enaklo - Membership Statement",
|
||||
Subject: "Hore, kamu dapat poin!",
|
||||
TemplateName: "monthly_points",
|
||||
TemplatePath: "templates/monthly_points.html",
|
||||
Data: emailData,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Laporan Keanggotaan Anda</title>
|
||||
<title>Points Notification</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@ -12,148 +12,136 @@
|
||||
padding: 0;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
background-color: #f1f0f7;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
border-collapse: collapse;
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
line-height: 100%;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
|
||||
.mj-column-per-100 {
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
background-color: #f5f5f5;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: #ffffff;
|
||||
margin: 0px auto;
|
||||
max-width: 600px;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
||||
padding: 0;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
color: #f46f02;
|
||||
background-color: #d90000;
|
||||
padding: 25px 30px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-size: 20px;
|
||||
line-height: 22px;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.points {
|
||||
display: block;
|
||||
width: fit-content;
|
||||
margin: 20px auto;
|
||||
background-color: #f5f5f5;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
padding: 15px 25px;
|
||||
border-radius: 5px;
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-size: 22px;
|
||||
line-height: 24px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
text-align: center;
|
||||
color: #808080;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: solid 1px #808080;
|
||||
margin: 20px auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 0 auto 20px;
|
||||
width: 150px;
|
||||
width: 120px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.greeting {
|
||||
color: white;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.body-content {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.points-card {
|
||||
background-color: #fff8f0;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin-bottom: 25px;
|
||||
border-left: 5px solid #f46f02;
|
||||
}
|
||||
|
||||
.points-heading {
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.points-value {
|
||||
font-weight: bold;
|
||||
font-size: 28px;
|
||||
color: #f46f02;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.expiry {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.total-points-card {
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: #333333;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.cta-button {
|
||||
display: block;
|
||||
width: fit-content;
|
||||
margin: 20px auto;
|
||||
padding: 12px 20px;
|
||||
width: 100%;
|
||||
padding: 15px 0;
|
||||
background-color: #d90000;
|
||||
color: #ffffff !important;
|
||||
font-size: 16px;
|
||||
font-family: Ubuntu, Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
text-decoration: none !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
color: #808080;
|
||||
margin-top: 30px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="padding: 50px; background-color: #f1f0f7;">
|
||||
<div style="padding: 40px 20px; background-color: #f5f5f5;">
|
||||
<div class="content">
|
||||
<img src="https://res.cloudinary.com/dl0wpumax/image/upload/c_thumb,w_200,g_face/v1741363977/61747686_5_vtz0n4.png" alt="Enaklo Logo" class="logo">
|
||||
<div class="title">Laporan Keanggotaan Anda</div>
|
||||
<div class="text">
|
||||
Hi {{ .UserName }},<br><br>
|
||||
Berikut adalah laporan keanggotaan Anda untuk bulan ini. Saldo <b>{{ .PointsName }}</b> Anda saat ini adalah:
|
||||
<div class="header">
|
||||
<img src="https://res.cloudinary.com/dl0wpumax/image/upload/c_thumb,w_200,g_face/v1741363977/61747686_5_vtz0n4.png" alt="Enaklo Logo" class="logo">
|
||||
<h1 class="greeting">Hai {{ .UserName }}!</h1>
|
||||
</div>
|
||||
<div class="points">{{ .PointsBalance }} {{ .PointsName }}</div>
|
||||
<div class="text">
|
||||
Gunakan {{ .PointsName }} Anda untuk menukarkan diskon spesial dan hadiah menarik! <br>
|
||||
Cek penawaran terbaru dan nikmati makanan favorit Anda.
|
||||
</div>
|
||||
<a href="{{ .RedeemLink }}" class="cta-button">Tukarkan Sekarang</a>
|
||||
<div class="divider"></div>
|
||||
<div class="footer">
|
||||
Email ini dikirim secara otomatis. Mohon jangan membalas email ini. <br>
|
||||
Butuh bantuan? Hubungi tim support kami di <a href="mailto:support@enaklo.com">support@enaklo.com</a>.
|
||||
|
||||
<div class="body-content">
|
||||
<div class="points-card">
|
||||
<p class="points-heading">Kamu dapat poin</p>
|
||||
<p class="points-value">{{ .NewPoints }} {{ .PointsName }}</p>
|
||||
<p class="expiry">Berlaku sampai {{ .ExpiryDate }}</p>
|
||||
</div>
|
||||
|
||||
<div class="message">
|
||||
Kamu bisa pakai poinnya untuk memotong jumlah transaksimu atau ditukarkan dengan Deals. Yuk, pakai sekarang!
|
||||
</div>
|
||||
|
||||
<a href="{{ .RedeemLink }}" class="cta-button">Pakai Sekarang</a>
|
||||
|
||||
<div class="footer">
|
||||
Email ini dikirim secara otomatis. Mohon jangan membalas email ini.<br>
|
||||
Butuh bantuan? Hubungi tim support kami di <a href="mailto:support@enaklo.com" style="color: #f46f02;">support@enaklo.com</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user