@platform-x/hep-notification-client 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/jest-setup.js +28 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/src/common/controllers/common_controller.js +72 -0
- package/dist/src/common/controllers/common_controller.js.map +1 -0
- package/dist/src/common/controllers/index.js +29 -0
- package/dist/src/common/controllers/index.js.map +1 -0
- package/dist/src/common/middleware/commonMiddleware.js +141 -0
- package/dist/src/common/middleware/commonMiddleware.js.map +1 -0
- package/dist/src/common/service/requestService.js +79 -1
- package/dist/src/common/service/requestService.js.map +1 -0
- package/dist/src/common/service/twilioService.js +3 -11
- package/dist/src/common/service/twilioService.js.map +1 -0
- package/dist/src/common/util/commonUtil.js +119 -1
- package/dist/src/common/util/commonUtil.js.map +1 -0
- package/dist/src/common/util/constants.js +18 -0
- package/dist/src/common/util/constants.js.map +1 -0
- package/dist/src/common/util/errorHandler.js +4 -6
- package/dist/src/common/util/errorHandler.js.map +1 -0
- package/dist/src/common/util/httpCodes.js +26 -0
- package/dist/src/common/util/httpCodes.js.map +1 -0
- package/dist/src/common/util/logger.js +1 -1
- package/dist/src/common/util/logger.js.map +1 -0
- package/dist/src/common/util/requestTracer.js +18 -1
- package/dist/src/common/util/requestTracer.js.map +1 -0
- package/dist/src/common/util/solrConnector.js.map +1 -0
- package/dist/src/config/index.js +49 -4
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/platform-x/app.js +35 -0
- package/dist/src/platform-x/app.js.map +1 -0
- package/dist/src/platform-x/constants/index.js +2 -14
- package/dist/src/platform-x/constants/index.js.map +1 -0
- package/dist/src/platform-x/constants/style.js +98 -98
- package/dist/src/platform-x/constants/style.js.map +1 -0
- package/dist/src/platform-x/controllers/cronController.js +399 -0
- package/dist/src/platform-x/controllers/cronController.js.map +1 -0
- package/dist/src/platform-x/controllers/fileUploadController.js +76 -0
- package/dist/src/platform-x/controllers/fileUploadController.js.map +1 -0
- package/dist/src/platform-x/controllers/graphRESTControllers.js +183 -0
- package/dist/src/platform-x/controllers/graphRESTControllers.js.map +1 -0
- package/dist/src/platform-x/controllers/index.js +30 -0
- package/dist/src/platform-x/controllers/index.js.map +1 -0
- package/dist/src/platform-x/controllers/siteDomainController.js +74 -0
- package/dist/src/platform-x/controllers/siteDomainController.js.map +1 -0
- package/dist/src/platform-x/dataSource/emailDataSource.js.map +1 -0
- package/dist/src/platform-x/database/connection.js +3 -6
- package/dist/src/platform-x/database/connection.js.map +1 -0
- package/dist/src/platform-x/database/dao/formBuilder.dao.js +1 -1
- package/dist/src/platform-x/database/dao/formBuilder.dao.js.map +1 -0
- package/dist/src/platform-x/database/dao/siteDomain.dao.js +73 -0
- package/dist/src/platform-x/database/dao/siteDomain.dao.js.map +1 -0
- package/dist/src/platform-x/database/index.js.map +1 -0
- package/dist/src/platform-x/{interface/interface.js → database/interfaces/site_domain.interface.js} +1 -1
- package/dist/src/platform-x/database/interfaces/site_domain.interface.js.map +1 -0
- package/dist/src/platform-x/database/models/formBuilder.model.js.map +1 -0
- package/dist/src/platform-x/database/models/site_domains.model.js +51 -0
- package/dist/src/platform-x/database/models/site_domains.model.js.map +1 -0
- package/dist/src/platform-x/routes/index.js +19 -0
- package/dist/src/platform-x/routes/index.js.map +1 -0
- package/dist/src/platform-x/services/cron.services.js +117 -0
- package/dist/src/platform-x/services/cron.services.js.map +1 -0
- package/dist/src/platform-x/util/emailHandler.js +53 -137
- package/dist/src/platform-x/util/emailHandler.js.map +1 -0
- package/dist/src/platform-x/util/emailTemplate.js +63 -60
- package/dist/src/platform-x/util/emailTemplate.js.map +1 -0
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.js +2 -0
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.js.map +1 -0
- package/dist/src/server.js +38 -0
- package/dist/src/server.js.map +1 -0
- package/dist/swagger.json +247 -0
- package/dist/test/controllers/common_controller.spec.js +79 -0
- package/dist/test/controllers/common_controller.spec.js.map +1 -0
- package/dist/test/middleware/commonMiddleware.spec.js +88 -0
- package/dist/test/middleware/commonMiddleware.spec.js.map +1 -0
- package/dist/test/platform-x/controllers/graphRESTControllers.spec.js +195 -0
- package/dist/test/platform-x/controllers/graphRESTControllers.spec.js.map +1 -0
- package/dist/test/platform-x/datasource/emailDataSource.spec.js +81 -0
- package/dist/test/platform-x/datasource/emailDataSource.spec.js.map +1 -0
- package/dist/test/platform-x/util/emailHandler.spec.js +474 -0
- package/dist/test/platform-x/util/emailHandler.spec.js.map +1 -0
- package/dist/test/platform-x/util/solr-data-source/SolrHttpDataSource.spec.js +80 -0
- package/dist/test/platform-x/util/solr-data-source/SolrHttpDataSource.spec.js.map +1 -0
- package/dist/test/services/requestService.spec.js +108 -0
- package/dist/test/services/requestService.spec.js.map +1 -0
- package/dist/test/services/requestServiceGet.spec.js +43 -0
- package/dist/test/services/requestServiceGet.spec.js.map +1 -0
- package/dist/test/src/common/service/twilioService.spec.js +65 -0
- package/dist/test/src/common/service/twilioService.spec.js.map +1 -0
- package/dist/test/util/commonUtil.spec.js +110 -0
- package/dist/test/util/commonUtil.spec.js.map +1 -0
- package/dist/test/util/logger.spec.js +51 -0
- package/dist/test/util/logger.spec.js.map +1 -0
- package/dist/test/util/requestTracer.spec.js +64 -0
- package/dist/test/util/requestTracer.spec.js.map +1 -0
- package/dist/test/util/solrconnector.spec.js +145 -0
- package/dist/test/util/solrconnector.spec.js.map +1 -0
- package/package.json +66 -62
- package/postman_collection/HEP_Environment.postman_environment.json +44 -44
- package/postman_collection/hep-notification.postman_collection.json +55 -55
- package/reports/output.jtl +1 -1
- package/reports/scripts/jmeter_sendgrid.js +34 -34
- package/reports/scripts/newman_sendgrid.js +40 -40
- package/reports/scripts/sendgrid.js +40 -40
- package/reports/scripts/trivy_sendgrid.js +40 -40
- package/src/common/service/requestService.ts +87 -0
- package/{dist/src/common/service/secretKeyManager.services.js → src/common/service/secretKeyManager.services.ts} +1 -2
- package/src/common/service/twilioService.ts +58 -0
- package/src/common/util/commonUtil.ts +39 -0
- package/src/common/util/errorHandler.ts +120 -0
- package/src/common/util/logger.ts +215 -0
- package/src/common/util/requestTracer.ts +10 -0
- package/src/common/util/solrConnector.ts +319 -0
- package/src/config/index.ts +35 -0
- package/src/index.ts +34 -0
- package/src/platform-x/constants/index.ts +20 -0
- package/src/platform-x/constants/style.ts +99 -0
- package/src/platform-x/dataSource/emailDataSource.ts +34 -0
- package/src/platform-x/database/connection.ts +47 -0
- package/src/platform-x/database/dao/formBuilder.dao.ts +33 -0
- package/src/platform-x/database/index.ts +7 -0
- package/src/platform-x/database/models/formBuilder.model.ts +23 -0
- package/src/platform-x/util/emailHandler.ts +580 -0
- package/src/platform-x/util/emailTemplate.ts +66 -0
- package/src/platform-x/util/solr-data-source/SolrHttpDataSource.ts +97 -0
- package/{dist → src}/templates/orderPlaced.ejs +172 -172
- package/{dist → src}/templates/orderPlaced.html +189 -189
- package/tsconfig.json +73 -0
- package/dist/src/common/service/requestService.d.ts +0 -26
- package/dist/src/common/service/secretKeyManager.services.d.ts +0 -0
- package/dist/src/common/service/twilioService.d.ts +0 -19
- package/dist/src/common/util/commonUtil.d.ts +0 -22
- package/dist/src/common/util/errorHandler.d.ts +0 -44
- package/dist/src/common/util/logger.d.ts +0 -68
- package/dist/src/common/util/requestTracer.d.ts +0 -2
- package/dist/src/common/util/secretKeyManager.d.ts +0 -7
- package/dist/src/common/util/secretKeyManager.js +0 -58
- package/dist/src/common/util/solrConnector.d.ts +0 -35
- package/dist/src/config/index.d.ts +0 -30
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +0 -20
- package/dist/src/platform-x/constants/index.d.ts +0 -18
- package/dist/src/platform-x/constants/style.d.ts +0 -1
- package/dist/src/platform-x/dataSource/emailDataSource.d.ts +0 -5
- package/dist/src/platform-x/database/connection.d.ts +0 -8
- package/dist/src/platform-x/database/dao/formBuilder.dao.d.ts +0 -9
- package/dist/src/platform-x/database/index.d.ts +0 -7
- package/dist/src/platform-x/database/models/formBuilder.model.d.ts +0 -34
- package/dist/src/platform-x/interface/interface.d.ts +0 -4
- package/dist/src/platform-x/util/emailHandler.d.ts +0 -62
- package/dist/src/platform-x/util/emailTemplate.d.ts +0 -4
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.d.ts +0 -26
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { DataSource } from 'apollo-datasource';
|
|
2
|
+
import { KeyValueCache, InMemoryLRUCache} from 'apollo-server-caching';
|
|
3
|
+
import { SolrClient } from '../../../common/util/solrConnector';
|
|
4
|
+
import QuickLRU from '@alloc/quick-lru';
|
|
5
|
+
import { Logger } from '../../../common/util/logger';
|
|
6
|
+
|
|
7
|
+
export interface Pagination {
|
|
8
|
+
start: number;
|
|
9
|
+
rows: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FilterQueryType {
|
|
12
|
+
field: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SolrQueryRequest {
|
|
16
|
+
query: string | object;
|
|
17
|
+
filterQuery?: FilterQueryType[] | null;
|
|
18
|
+
pagination?: Pagination;
|
|
19
|
+
filter?: object | string[];
|
|
20
|
+
sort?: object;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class SolrHttpDataSource<TContext = any> extends DataSource {
|
|
24
|
+
public context!: TContext;
|
|
25
|
+
private solr: SolrClient;
|
|
26
|
+
private cache!: KeyValueCache<string>;
|
|
27
|
+
private memoizedResults: QuickLRU<unknown, unknown>;
|
|
28
|
+
// private loader: DataLoader<unknown, unknown, unknown>;
|
|
29
|
+
constructor(core?: string) {
|
|
30
|
+
super();
|
|
31
|
+
this.solr = new SolrClient(core);
|
|
32
|
+
this.memoizedResults = new QuickLRU({
|
|
33
|
+
// The maximum number of items before evicting the least recently used items.
|
|
34
|
+
maxSize: 50,
|
|
35
|
+
// The maximum number of milliseconds an item should remain in cache.
|
|
36
|
+
// By default maxAge will be Infinity, which means that items will never expire.
|
|
37
|
+
maxAge: 10000,
|
|
38
|
+
});
|
|
39
|
+
// this.loader = new DataLoader(ids => dbClient.getByIds(ids))
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
initialize({ context, cache }: any = {}) {
|
|
43
|
+
this.context = context;
|
|
44
|
+
this.cache = cache || new InMemoryLRUCache();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
didEncounterError(error: any) {
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
cacheKey(id: string) {
|
|
52
|
+
return `solr-${id}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
memoizedCacheKey(): string {
|
|
56
|
+
const queryParams = this.solr.getQuery();
|
|
57
|
+
return queryParams ? new URLSearchParams(queryParams).toString() : '';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
createQuery(queryRequest: SolrQueryRequest): void {
|
|
61
|
+
let { query, pagination, filter, sort, filterQuery } = queryRequest;
|
|
62
|
+
try {
|
|
63
|
+
let solrQuery = this.solr.createQuery();
|
|
64
|
+
solrQuery.query(query); // q
|
|
65
|
+
solrQuery.paginate(pagination?.start, pagination?.rows); // start, rows
|
|
66
|
+
solrQuery.filterList(filter); // fl
|
|
67
|
+
solrQuery.sort(sort); // sort
|
|
68
|
+
solrQuery.filterQuery(filterQuery); // fq
|
|
69
|
+
Logger.info('SolrHttpDataSource:Solr Query created', 'createQuery');
|
|
70
|
+
Logger.debug('SolrHttpDataSource query payload', 'createQuery', {
|
|
71
|
+
query: JSON.stringify(this.solr.getQuery()),
|
|
72
|
+
});
|
|
73
|
+
} catch (err: any) {
|
|
74
|
+
Logger.error('Error with SOLR query creation: ', 'SOLR creation', err);
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async executeSearch(): Promise<any> {
|
|
80
|
+
let response;
|
|
81
|
+
try {
|
|
82
|
+
let cacheKey: any = this.memoizedCacheKey();
|
|
83
|
+
if (this.memoizedResults.has(cacheKey)) {
|
|
84
|
+
response = this.memoizedResults.get(cacheKey)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
85
|
+
return response;
|
|
86
|
+
} else {
|
|
87
|
+
response = await this.solr.executeSearch();
|
|
88
|
+
this.memoizedResults.set(cacheKey, response);
|
|
89
|
+
|
|
90
|
+
return response;
|
|
91
|
+
}
|
|
92
|
+
} catch (err: any) {
|
|
93
|
+
Logger.error('Error with SOLR query execution: ', 'SOLR QUERY', err);
|
|
94
|
+
throw err;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
2
|
-
<tbody>
|
|
3
|
-
<tr>
|
|
4
|
-
<td width="100%">
|
|
5
|
-
<div style="max-width:600px;Margin:0 auto">
|
|
6
|
-
<table align="center" cellpadding="0" cellspacing="0"
|
|
7
|
-
style="border-spacing:0;font-family:gt-eesti,ArialMT,Helvetica,Arial,sans-serif;Margin:0 auto;padding:24px;width:100%;max-width:500px">
|
|
8
|
-
<tbody>
|
|
9
|
-
<tr>
|
|
10
|
-
<td>
|
|
11
|
-
<table style="margin-bottom:40px;width:100%" width="100%">
|
|
12
|
-
<tbody>
|
|
13
|
-
</tbody>
|
|
14
|
-
</table>
|
|
15
|
-
</td>
|
|
16
|
-
</tr>
|
|
17
|
-
<tr>
|
|
18
|
-
<td style="text-align:justify;word-break:break-word">
|
|
19
|
-
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
20
|
-
<tbody>
|
|
21
|
-
<tr>
|
|
22
|
-
<td>
|
|
23
|
-
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
24
|
-
<tbody>
|
|
25
|
-
<tr>
|
|
26
|
-
<td>
|
|
27
|
-
<strong style="font-family:Helvetica,Arial,sans-serif;color:#234567">Hi <%= userName
|
|
28
|
-
%>, </strong>
|
|
29
|
-
|
|
30
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
31
|
-
Your Order <%= orderNumber %> has been placed sucessfully
|
|
32
|
-
</p>
|
|
33
|
-
</td>
|
|
34
|
-
</tr>
|
|
35
|
-
<tr>
|
|
36
|
-
<td>
|
|
37
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
38
|
-
Address Details <%= completeAddressStr %>
|
|
39
|
-
</p>
|
|
40
|
-
</td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr>
|
|
43
|
-
<td>
|
|
44
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
45
|
-
Tax Calculated on your order is <%= total_tax %>
|
|
46
|
-
</p>
|
|
47
|
-
</td>
|
|
48
|
-
</tr>
|
|
49
|
-
</tbody>
|
|
50
|
-
</table>
|
|
51
|
-
</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</tbody>
|
|
54
|
-
</table>
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
<tr>
|
|
58
|
-
<td>
|
|
59
|
-
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
60
|
-
<tbody>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>
|
|
63
|
-
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
64
|
-
<tbody>
|
|
65
|
-
<tr> Package Details</tr>
|
|
66
|
-
<tr>
|
|
67
|
-
<td>
|
|
68
|
-
Item Name
|
|
69
|
-
</td>
|
|
70
|
-
<td>
|
|
71
|
-
Price
|
|
72
|
-
</td>
|
|
73
|
-
<td>
|
|
74
|
-
Quantity
|
|
75
|
-
</td>
|
|
76
|
-
<!-- <td>
|
|
77
|
-
Colour
|
|
78
|
-
</td>
|
|
79
|
-
<td>
|
|
80
|
-
Size
|
|
81
|
-
</td> -->
|
|
82
|
-
<td>
|
|
83
|
-
Brand
|
|
84
|
-
</td>
|
|
85
|
-
</tr>
|
|
86
|
-
<!-- <% for (var key in data) { %>
|
|
87
|
-
<h3>
|
|
88
|
-
<%= data[key].ecomx_en_name %>
|
|
89
|
-
</h3>
|
|
90
|
-
<h3>
|
|
91
|
-
<%= data[key].ecomx_quantity %>
|
|
92
|
-
</h3>
|
|
93
|
-
<h3>
|
|
94
|
-
<%= data[key].ecomx_attributes_size %>
|
|
95
|
-
</h3>
|
|
96
|
-
<% } %> -->
|
|
97
|
-
<% for (var key in data) { %>
|
|
98
|
-
<tr>
|
|
99
|
-
<td>
|
|
100
|
-
<%= data[key].ecomx_en_name %>
|
|
101
|
-
</td>
|
|
102
|
-
<td>
|
|
103
|
-
<%= data[key].total_price %>
|
|
104
|
-
<%= data[key].ecomx_currency_code %>
|
|
105
|
-
</td>
|
|
106
|
-
<td>
|
|
107
|
-
<%= data[key].ecomx_quantity %>
|
|
108
|
-
</td>
|
|
109
|
-
<!-- <td>
|
|
110
|
-
<%= data[key].ecomx_attributes_colour %>
|
|
111
|
-
</td>
|
|
112
|
-
<td>
|
|
113
|
-
<%= data[key].ecomx_attributes_size %>
|
|
114
|
-
</td> -->
|
|
115
|
-
<td>
|
|
116
|
-
<%= data[key].ecomx_attributes_brand %>
|
|
117
|
-
</td>
|
|
118
|
-
</tr>
|
|
119
|
-
<% } %>
|
|
120
|
-
</tbody>
|
|
121
|
-
</table>
|
|
122
|
-
</td>
|
|
123
|
-
</tr>
|
|
124
|
-
</tbody>
|
|
125
|
-
</table>
|
|
126
|
-
</td>
|
|
127
|
-
</tr>
|
|
128
|
-
<tr>
|
|
129
|
-
<td style="text-align:center">
|
|
130
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
131
|
-
Order total <%= total_price %>
|
|
132
|
-
</p>
|
|
133
|
-
</td>
|
|
134
|
-
</tr>
|
|
135
|
-
<tr>
|
|
136
|
-
<td>
|
|
137
|
-
<table width="100%" style="margin-bottom:20px;width:100%">
|
|
138
|
-
<tbody>
|
|
139
|
-
<tr>
|
|
140
|
-
<td width="100%">
|
|
141
|
-
<div style="width:100%;height:1px;background-color:#ddd" color="#DDD" width="100%"></div>
|
|
142
|
-
</td>
|
|
143
|
-
</tr>
|
|
144
|
-
</tbody>
|
|
145
|
-
</table>
|
|
146
|
-
</td>
|
|
147
|
-
</tr>
|
|
148
|
-
<tr>
|
|
149
|
-
<td style="text-align:center">
|
|
150
|
-
<table style="max-width:100%;width:100%;text-align:center;font-family:ArialMT,Arial,sans-serif"
|
|
151
|
-
cellspacing="0" cellpadding="0">
|
|
152
|
-
<tbody>
|
|
153
|
-
<tr>
|
|
154
|
-
<td style="text-align:center">
|
|
155
|
-
<p
|
|
156
|
-
style="font-size:10px;color:#708c91;text-align:center;padding:0;margin-top:10px;margin-bottom:2px">
|
|
157
|
-
This email was sent to you by
|
|
158
|
-
Platofrm X (Do not reply)
|
|
159
|
-
</p>
|
|
160
|
-
</td>
|
|
161
|
-
</tr>
|
|
162
|
-
</tbody>
|
|
163
|
-
</table>
|
|
164
|
-
</td>
|
|
165
|
-
</tr>
|
|
166
|
-
|
|
167
|
-
</tbody>
|
|
168
|
-
</table>
|
|
169
|
-
</div>
|
|
170
|
-
</td>
|
|
171
|
-
</tr>
|
|
172
|
-
</tbody>
|
|
1
|
+
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
2
|
+
<tbody>
|
|
3
|
+
<tr>
|
|
4
|
+
<td width="100%">
|
|
5
|
+
<div style="max-width:600px;Margin:0 auto">
|
|
6
|
+
<table align="center" cellpadding="0" cellspacing="0"
|
|
7
|
+
style="border-spacing:0;font-family:gt-eesti,ArialMT,Helvetica,Arial,sans-serif;Margin:0 auto;padding:24px;width:100%;max-width:500px">
|
|
8
|
+
<tbody>
|
|
9
|
+
<tr>
|
|
10
|
+
<td>
|
|
11
|
+
<table style="margin-bottom:40px;width:100%" width="100%">
|
|
12
|
+
<tbody>
|
|
13
|
+
</tbody>
|
|
14
|
+
</table>
|
|
15
|
+
</td>
|
|
16
|
+
</tr>
|
|
17
|
+
<tr>
|
|
18
|
+
<td style="text-align:justify;word-break:break-word">
|
|
19
|
+
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr>
|
|
22
|
+
<td>
|
|
23
|
+
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
24
|
+
<tbody>
|
|
25
|
+
<tr>
|
|
26
|
+
<td>
|
|
27
|
+
<strong style="font-family:Helvetica,Arial,sans-serif;color:#234567">Hi <%= userName
|
|
28
|
+
%>, </strong>
|
|
29
|
+
|
|
30
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
31
|
+
Your Order <%= orderNumber %> has been placed sucessfully
|
|
32
|
+
</p>
|
|
33
|
+
</td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td>
|
|
37
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
38
|
+
Address Details <%= completeAddressStr %>
|
|
39
|
+
</p>
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr>
|
|
43
|
+
<td>
|
|
44
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
45
|
+
Tax Calculated on your order is <%= total_tax %>
|
|
46
|
+
</p>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</tbody>
|
|
54
|
+
</table>
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr>
|
|
58
|
+
<td>
|
|
59
|
+
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
60
|
+
<tbody>
|
|
61
|
+
<tr>
|
|
62
|
+
<td>
|
|
63
|
+
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
64
|
+
<tbody>
|
|
65
|
+
<tr> Package Details</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>
|
|
68
|
+
Item Name
|
|
69
|
+
</td>
|
|
70
|
+
<td>
|
|
71
|
+
Price
|
|
72
|
+
</td>
|
|
73
|
+
<td>
|
|
74
|
+
Quantity
|
|
75
|
+
</td>
|
|
76
|
+
<!-- <td>
|
|
77
|
+
Colour
|
|
78
|
+
</td>
|
|
79
|
+
<td>
|
|
80
|
+
Size
|
|
81
|
+
</td> -->
|
|
82
|
+
<td>
|
|
83
|
+
Brand
|
|
84
|
+
</td>
|
|
85
|
+
</tr>
|
|
86
|
+
<!-- <% for (var key in data) { %>
|
|
87
|
+
<h3>
|
|
88
|
+
<%= data[key].ecomx_en_name %>
|
|
89
|
+
</h3>
|
|
90
|
+
<h3>
|
|
91
|
+
<%= data[key].ecomx_quantity %>
|
|
92
|
+
</h3>
|
|
93
|
+
<h3>
|
|
94
|
+
<%= data[key].ecomx_attributes_size %>
|
|
95
|
+
</h3>
|
|
96
|
+
<% } %> -->
|
|
97
|
+
<% for (var key in data) { %>
|
|
98
|
+
<tr>
|
|
99
|
+
<td>
|
|
100
|
+
<%= data[key].ecomx_en_name %>
|
|
101
|
+
</td>
|
|
102
|
+
<td>
|
|
103
|
+
<%= data[key].total_price %>
|
|
104
|
+
<%= data[key].ecomx_currency_code %>
|
|
105
|
+
</td>
|
|
106
|
+
<td>
|
|
107
|
+
<%= data[key].ecomx_quantity %>
|
|
108
|
+
</td>
|
|
109
|
+
<!-- <td>
|
|
110
|
+
<%= data[key].ecomx_attributes_colour %>
|
|
111
|
+
</td>
|
|
112
|
+
<td>
|
|
113
|
+
<%= data[key].ecomx_attributes_size %>
|
|
114
|
+
</td> -->
|
|
115
|
+
<td>
|
|
116
|
+
<%= data[key].ecomx_attributes_brand %>
|
|
117
|
+
</td>
|
|
118
|
+
</tr>
|
|
119
|
+
<% } %>
|
|
120
|
+
</tbody>
|
|
121
|
+
</table>
|
|
122
|
+
</td>
|
|
123
|
+
</tr>
|
|
124
|
+
</tbody>
|
|
125
|
+
</table>
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td style="text-align:center">
|
|
130
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
131
|
+
Order total <%= total_price %>
|
|
132
|
+
</p>
|
|
133
|
+
</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td>
|
|
137
|
+
<table width="100%" style="margin-bottom:20px;width:100%">
|
|
138
|
+
<tbody>
|
|
139
|
+
<tr>
|
|
140
|
+
<td width="100%">
|
|
141
|
+
<div style="width:100%;height:1px;background-color:#ddd" color="#DDD" width="100%"></div>
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
</tbody>
|
|
145
|
+
</table>
|
|
146
|
+
</td>
|
|
147
|
+
</tr>
|
|
148
|
+
<tr>
|
|
149
|
+
<td style="text-align:center">
|
|
150
|
+
<table style="max-width:100%;width:100%;text-align:center;font-family:ArialMT,Arial,sans-serif"
|
|
151
|
+
cellspacing="0" cellpadding="0">
|
|
152
|
+
<tbody>
|
|
153
|
+
<tr>
|
|
154
|
+
<td style="text-align:center">
|
|
155
|
+
<p
|
|
156
|
+
style="font-size:10px;color:#708c91;text-align:center;padding:0;margin-top:10px;margin-bottom:2px">
|
|
157
|
+
This email was sent to you by
|
|
158
|
+
Platofrm X (Do not reply)
|
|
159
|
+
</p>
|
|
160
|
+
</td>
|
|
161
|
+
</tr>
|
|
162
|
+
</tbody>
|
|
163
|
+
</table>
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
|
|
167
|
+
</tbody>
|
|
168
|
+
</table>
|
|
169
|
+
</div>
|
|
170
|
+
</td>
|
|
171
|
+
</tr>
|
|
172
|
+
</tbody>
|
|
173
173
|
</table>
|