Send welcome email with voucher to user upon successful verification of customer email adddress

This commit is contained in:
Dillon Ngo
2024-03-14 15:52:20 +08:00
parent cc8a12c7b0
commit 36cde82a19
18 changed files with 384 additions and 15 deletions
@@ -9,6 +9,10 @@
<p v-if="item.voucher.type == 'AMOUNT'">RM{{ item.voucher.value/100 }} Discount</p>
<p v-if="item.voucher.type == 'PERCENT'">{{ item.voucher.value }}% Discount</p>
</div>
<div class="card-body border-top" v-if="$store.getters.isAdmin && item.voucher.email && item.voucher.email.key === item.voucher.code + '_EMAIL_COUNT'">
<button disabled type="button" v-if="item.voucher.email && item.voucher.email.key === item.voucher.code + '_EMAIL_COUNT' && item.voucher.email.value == '1'" class="btn btn-lg btn-primary">Email Reminder #1 Sent</button>
<!-- <button type="button" v-else @click="submit()" class="btn btn-lg btn-primary">Send Email Reminder #1</button> -->
</div>
<div class="card-footer text-muted">
<p v-if="item.voucher && item.voucher.is_redeemed">
Voucher claimed
@@ -25,6 +29,9 @@
<script>
import componentHandler from '../../../general/mixins/componentHandler';
export default {
methods: {
submit(){},
},
mixins: [componentHandler]
}
</script>
@@ -0,0 +1,8 @@
@extends('emails.layout.base')
@section('content')
<h4 style="font-size: 1em;">Hello, {{$user->name}}</h4>
<p style="font-size: 0.9em">Welcome to Exchange! We're thrilled to have you onboard as a new member. To kick things off, please use the following voucher for your first purchase</p>
<p style="font-size: 0.9em">Voucher code: <span class="bold">{{$voucher->code}}</span></p>
<p style="margin-top: 30px; font-size: 0.8em">This voucher is valid until {{ $voucher->end_date}}</p>
@endsection