INNER CODE UNIT · JavaScript
payOrderEmailTemplate
basir/mern-amazona · backend/utils.js:57
export const payOrderEmailTemplate = (order) => {
return `<h1>Thanks for shopping with us</h1>
<p>
Hi ${order.user.name},</p>
<p>We have finished processing your order.</p>
<h2>[Order ${order._id}] (${order.createdAt.toString().substring(0, 10)})</h2>
<table>
<thead>
<tr>
<td><strong>Product</strong></td>
<td><strong>Quantity</strong></td>
<td><strong align="right">Price</strong></td>
</thead>
<tbody>
${order.orderItems
.map(
(item) => `
<tr>