/
order-detail.html
585 lines (479 loc) · 28 KB
/
order-detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
xmlns="http://www.w3.org/1999/html"> <!-- Set this to the main language of your site -->
<head>
<meta charset="utf-8">
<title>Order Detail - My Account</title>
<meta name="description" content="View Order Details">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/normalize.css" rel="stylesheet" media="all">
<!-- For legacy support (IE 6/7, Firefox < 4, and Safari < 5) use normalize-legacy.css instead -->
<!--<link href="css/normalize-legacy.css" rel="stylesheet" media="all">-->
<link href="css/styles.css" rel="stylesheet" media="all">
<link href="css/order-detail-style.css" rel="stylesheet" media="all">
<!--[if lt IE 9]>
<script type='text/javascript' src="js/html5shiv-printshiv.js" media="all"></script><![endif]-->
<script type="text/javascript" src="js/modernizr-2.6.2.js"></script>
<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="js/moment.js"></script>
<script type="text/javascript" src="js/handlebars_1.0.js"></script>
<script type="text/javascript" src="js/underscore_1.4.4.js"></script>
<script type="text/javascript" src="js/myaccount_rest_1.4.js"></script>
<script type="text/javascript" src="js/myaccount.js"></script>
<script type="text/javascript" src="order-detail.js"></script>
<!-- TODO huge tutorial on the custom handlebars helpers and the Order object itself -->
<script type="text/template" id="order-template">
<!-- the backbone view will wrap this content in an <article class="order"></article> tag -->
<div class='order-detail'>
<table class='{{#if themeCode}}sbt-{{validClassName themeCode}}{{/if}} order'>
{{#compare paymentMethod 'Quote Request' operator='=='}}
{{startSection classes="quote-request-id quote-request-id-[orderId] order-section"}}
<tr>
<td class='quote-request-id-label label'>{{labels.quoteRequestIdField}}:</td>
<td class='quote-request-id-field field'>{{orderId}}</td>
</tr>
<tr class='quote-request-date'>
<td class='quote-request-date-label label'>{{labels.requestDateField}}:</td>
<td class='quote-request-date-field field'>{{dateFormat creationDate}}</td>
</tr>
<tr class='quote-expiration-date'>
<td class='quote-expiration-date-label label'>{{labels.expirationDateField}}:</td>
<td class='quote-expiration-date-field field'>{{dateFormat quoteExpirationDate}}</td>
</tr>
{{endSection}}
{{/compare}}
{{#compare paymentMethod 'Quote Request' operator='!='}}
{{startSection classes="order-section order-id order-id-[orderId]"}}
<tr>
<td class='order-id-label label'>{{labels.orderIdField}}:</td>
<td class='order-id-field field'>{{orderId}}</td>
</tr>
<tr class='creation-date'>
<td class='creation-date-label label'>{{labels.orderDateField}}:</td>
<td class='creation-date-field field'>{{dateFormat creationDate}}</td>
</tr>
{{endSection}}
{{/compare}}
<tr class='before-customer'>
<td></td>
</tr>
{{startSection class='customer-info order-section'}}
<tr>
<td style='vertical-align:top;'
class=' billto-section order-section {{#if billToState}}billto-state-{{validClassName billToState}}{{/if}} {{#if billToCountry}}billto-country-{{validClassName billToCountry}}{{/if}}'>
<!-- start billing table -->
<table class='billto-table'>
<tr>
<td class='billto-header section-header'>{{labels.billToHeader}}</td>
<td> </td>
</tr>
{{htmlField name="billto-company" label=labels.companyField value="[billToCompany]"}}
{{htmlField name="billto-title" label=labels.titleField value="[billToTitle]"}}
{{htmlField name="billto-name" label=labels.nameField value="[billToFirstName]
[billToLastName]"}}
{{htmlField name="billto-address1" label=labels.addressField value="[billToAddress1]"}}
{{htmlField name="billto-address2" label="" value="[billToAddress2]"}}
{{htmlField name="billto-city" label=labels.cityField value="[billToCity]"}}
{{htmlField name="billto-state" label=labels.stateField value="[billToState]"
classes="billto-state-[billToState]"}}
{{htmlField name="billto-zip" label=labels.zipField value="[billToPostalCode]"}}
{{htmlField name="billto-country" label=labels.countryField value="[billToCountry]"
classes="billto-country-[billToCountry]"}}
</table>
<!-- end billing table -->
</td>
<td style='vertical-align:top;'
class=' shipto-section order-section {{#if shipToState}}shipto-state-{{validClassName shipToState}}{{/if}} {{#if shipToCountry}}shipto-country-{{validClassName shipToCountry}}{{/if}}'>
<!-- start shipping table -->
<table class='shipto-table'>
<tr>
<td class='shipto-header section-header'>{{labels.shipToHeader}}</td>
<td> </td>
</tr>
{{htmlField name="shipto-company" label=labels.companyField value="[shipToCompany]"}}
{{htmlField name="shipto-title" label=labels.titleField value="[shipToTitle]"}}
{{htmlField name="shipto-name" label=labels.nameField value="[shipToFirstName]
[shipToLastName]"}}
{{htmlField name="shipto-address1" label=labels.addressField value="[shipToAddress1]"}}
{{htmlField name="shipto-address2" label="" value="[shipToAddress2]"}}
{{htmlField name="shipto-city" label=labels.cityField value="[shipToCity]"}}
{{htmlField name="shipto-state" label=labels.stateField value="[shipToState]"
classes="shipto-state-[shipToState]"}}
{{htmlField name="shipto-zip" label=labels.zipField value="[shipToPostalCode]"}}
{{htmlField name="shipto-country" label=labels.countryField value="[shipToCountry]"
classes="shipto-country-[shipToCountry]"}}
{{htmlField name="shipto-day-phone" label=labels.phoneField value="[shipToDayPhone]"}}
{{htmlField name="shipto-evening-phone" label=labels.eveningPhoneField
value="[shipToEveningPhone]"}}
</table>
<!-- end shipping table -->
</td>
</tr>
{{endSection}}{{! end of customer section }}
<tr class='after-customer'>
<td></td>
</tr>
<tr>
<td>
<table
class='misc-section order-section {{#if shippingMethodCompany}} shipping-method-{{validClassName shippingMethodCompany}}{{/if}}'>
{{htmlField name="shipping-method" label=labels.shippingMethodField
value="[shippingMethodDetailed]"
classes="shipping-method-[shippingMethodName]"}}
{{#if shipOnDate}}
{{htmlField name="ship-on-date" label=labels.shipOnDateField value="[shipOnDate]"
isDate="1"}}
{{/if}}
{{! can't use htmlField on delivery date since it has additional suffix of (Sat).. }}
{{#if deliveryDate}}
<tr>
<td class='delivery-date-label label'>{{labels.deliveryDateField}}:</td>
<td class='delivery-date-field field'>{{dateFormat deliveryDate}}
{{#if saturdayDelivery}} (Sat){{/if}}
</td>
</tr>
{{/if}}
{{#if shipping3rdPartyAccountNumber}}
{{htmlField name="ship-on-account" label=labels.shipOnAccountField
value="[shipping3rdPartyAccountNumber]"}}
{{/if}}
{{#if gift}}
{{htmlField name="gift" label=labels.giftField value="[gift]" isYesNo="1"}}
{{htmlField name="gift-email" label=labels.giftEmailField value="[giftEmail]"}}
{{/if}}
{{htmlField name="tax-county" label=labels.taxCountyField value="[taxCounty]"}}
</table>
</td>
</tr>
{{startSection classes='contact-section order-section'}}
<tr>
<td colspan='2' class='contact-header section-header'>Contact Info</td>
</tr>
{{htmlField name="contact-email" label=labels.emailField value="[email]"}}
{{#each ccEmails}}
{{htmlField name="cc-email" label=labels.ccEmailField value=this}}
{{/each}}{{! end of each ccEmails}}
{{#if billToDayPhone}}
{{htmlField name="contact-day-phone" label="Day Phone" value="[billToDayPhone]"}}
{{else}}
{{#if shipToDayPhone}}
{{htmlField name="contact-day-phone" label="Day Phone" value="[shipToDayPhone]"}}
{{/if}}
{{/if}}
{{#if billToEveningPhone}}
{{htmlField name="contact-evening-phone" label="Evening Phone" value="[billToEveningPhone]"}}
{{else}}
{{#if shipToEveningPhone}}
{{htmlField name="contact-evening-phone" label="Evening Phone" value="[shipToEveningPhone]"}}
{{/if}}
{{/if}}
{{htmlField name="contact-fax" label="Fax" value="[fax]"}}
{{endSection}}
{{#if referralCode}}
{{htmlField name="referral-code" label=labels.referralCodeField value="[referralCode]"}}
{{/if}}
{{startSection classes="payment-[paymentNote] payment-info-section order-section"}}
<tr class="{{classify paymentNote}}-order no-label">
<td class='{{classify paymentNote}}-field field payment-info-header'>{{paymentNote}}</td>
</tr>
{{#compare paymentMethod "Credit Card" operator="=="}}
{{htmlField name="card-type" label="Card Type" value="[cardType]" classes="card-type-[cardType]"}}
{{htmlField name="card-number" label="Card Number" value="[cardNumber]"}}
{{/compare}}
{{#compare paymentMethod "Check" operator="=="}}
{{#if paymentDate}}
{{htmlField name="check-number" label="Check Number" value="[checkNumber]"}}
{{/if}}
{{/compare}}
{{#compare paymentMethod "Purchase Order" operator="=="}}
{{htmlField name="purchase-order-number" label="Purchase Order Number" value="[purchaseOrderNumber]"}}
{{/compare}}
{{endSection}}
{{! Show the advertising source Code if it is available }}
{{#if advertisingSource}}
{{startSection classes="advertising-section order-section"}}
{{htmlField name="advertising-source" label=labels.advertisingSourceField value="[advertisingSource]"}}
{{endSection}}
{{/if}}
{{#if rejected}}
{{startSection classes="rejected-section order-section"}}
{{#if rejectedDate}}
{{htmlField name="rejected-order" label="Rejected Order" value="[rejectDate]" isDate="1"}}
{{else}}
{{htmlField name="rejected-order" label="Rejected Order" delimited=""}}
{{/if}}
{{endSection}}
{{/if}}
{{#if coupons}}
{{startSection classes="coupon-section order-section"}}
<tr>
<td colspan='2' class='coupon-header section-header'>Coupons</td>
</tr>
{{#each coupons}}
{{htmlFieldNoLabel name="coupon-code" value="[couponCode] - [description]" delimiter=""}}
{{/each}}
{{endSection}}
{{/if}}
<tr class='itemTableHeaderRow'>
<td>
<div class='itemTableHeader'>{{labels.itemTableHeader}}</div>
</td>
</tr>
<tr>
<td>
<table style='vertical-align:top'
class='item-section order-section {{#if hasRefund}}yes-refund{{else}}no-refund{{/if}} {{#if hasDiscount}}yes-discount{{else}}no-discount{{/if}}'>
<thead>
<tr class='item-header section-header {{#if hasRefund}}yes-refund{{else}}no-refund{{/if}} {{#if hasDiscount}}yes-discount{{else}}no-discount{{/if}}'>
<th class='item-id-header'>{{labels.itemHeader}}</th>
<th class='item-qty-header'>{{labels.quantityHeader}}</th>
<th class='item-description-header'>{{labels.descriptionHeader}}</th>
<th class='item-discount-header'>Discount</th>
<th class='item-cost-header'>{{labels.amountHeader}}</th>
<th class='item-refund-header'>{{labels.refundedHeader}}</th>
</tr>
</thead>
<tbody class='items'>
{{#each items}}
<tr class='item-id-{{validClassName itemId}} {{#if discount}}yes-discount{{else}}no-discount{{/if}} {{#if totalRefunded}}yes-refund{{else}}no-refund{{/if}} order-item'>
<td class='item-id'>{{itemId}}</td>
<td class='item-qty'>{{quantity}}</td>
<td class="item-description">
{{description}}
{{#if activationCode}}<br>{{activationCode}}{{/if}}
{{#if options}}
<br>
<table class='item-options'>
{{#each options}}
<tr>
<td class="option-{{validClassName label}} item-option">
<span class='option-label'>{{label}}</span>
<ul class='option-list'>
{{#each text}}
<li class='option-list-item'>{{this}}</li>
{{/each}}
</ul>
</td>
</tr>
{{/each}}
</table>
{{/if}}{{! end if-options }}
{{#if ediInformation}}
<table class='edi-destinations'>
{{#each ediInformation}}
<tr>
<td class='item-edi'>
{{this}}
</td>
</tr>
{{/each}}
</table>
{{/if}}
</td>
<td class='item-discount'>{{discountFormatted}}</td>
<td class='item-cost'>{{totalCostFormatted}}</td>
<td class='item-refund'>{{totalRefundFormatted}}</td>
</tr>
{{! end of individual item }}
{{/each}}
</tbody>
</table>
</td>
</tr>
{{! end of items wrapper around items }}
<tr>
<td>
<table
class='summary-section order-section {{#if hasRefund}}yes-refund{{else}}no-refund{{/if}} {{#if hasDiscount}}yes-discount{{else}}no-discount{{/if}} {{#if giftWrapTitle}}yes-gift-wrap{{else}}no-gift-wrap{{/if}}'>
{{#if giftWrapTitle}}
<tr class='gift-wrap'>
<td class='gift-wrap-cell'>
<span class='gift-wrap-label'>{{labels.wrappingPaperField}}:</span>
<span class='gift-wrap-title'>{{giftWrapTitle}}</span>
</td>
<td class='gift-wrap-cost'>{{giftWrapCostFormatted}}</td>
</tr>
{{/if}}
{{#if subtotalDiscount}}
{{htmlField name="subtotal-before-discount" label=labels.subtotalBeforeDiscountsField
value="[subtotalBeforeDiscountFormatted]" delimiter=""}}
{{htmlField name="subtotal-discount" label=labels.discountsField value="[discountFormatted]"
delimiter=""}}
{{/if}}
<tr class='subtotal'>
<td class='subtotal-label label'>{{labels.subtotalField}}</td>
<td class='subtotal-field field'>{{subtotalFormatted}}
{{#if subtotalRefunded}}
<span class='subtotal-refund refund'>{{subtotalRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{#if taxShipping}}
{{! if shipping is taxed, show shipping before the tax, else show tax first }}
<tr class='shipping-handling'>
<td class='shipping-handling-label label'>{{labels.shippingHandlingField}}</td>
<td class='shipping-handling-field field'>{{shippingHandlingTotalFormatted}}
{{#if shippingHandlingRefunded}}
<span class='shipping-handling-refund refund'>{{shippingHandlingRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{htmlField name="tax-rate" label=labels.taxRateField value="[taxRateFormatted]"
delimiter=""}}
<tr class='tax'>
<td class='tax-label label'>{{labels.taxField}}</td>
<td class='tax-field field'>{{taxFormatted}}
{{#if taxRefunded}}
<span class='tax-refund refund'>{{taxRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{else}}
{{htmlField name="tax-rate" label=labels.taxRateField value="[taxRateFormatted]"
delimiter=""}}
<tr class='tax'>
<td class='tax-label label'>{{labels.taxField}}</td>
<td class='tax-field field'>{{taxFormatted}}
{{#if taxRefunded}}
<span class='tax-refund refund'>{{taxRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
<tr class='shipping-handling'>
<td class='shipping-handling-label label'>{{labels.shippingHandlingField}}</td>
<td class='shipping-handling-field field'>{{shippingHandlingTotalFormatted}}
{{#if shippingHandlingRefunded}}
<span class='shipping-handling-refund refund'>{{shippingHandlingRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{/if}}
{{#if giftCharge}}
{{htmlField name='gift-charge' label=labels.giftChargeField value="[giftChargeFormatted]"
delimiter=""}}
{{/if}}
{{#if surcharge}}
{{htmlField name='surcharge' label=labels.surchargeField value="[surchargeFormatted]"
delimiter=""}}
{{/if}}
{{#if showBuysafe}}
<tr class='buysafe'>
<td class='buysafe-label label'>buySAFE</td>
<td class='buysafe-field field'>{{buysafeCostFormatted}}
{{#if buysafeRefunded}}
<span class='buysafe-refund refund'>{{buysafeRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{/if}}
{{#if showInsureShip}}
<tr class='insure-ship'>
<td class='insure-ship-label label'>InsureSHip</td>
<td class='insure-ship-field field'>{{insureShipCostFormatted}}
{{#if insureShipRefunded}}
<span class='insure-ship-refund refund'>{{insureShipRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
{{/if}}
{{#if giftCertificateAmount}}
<tr class='gift-certificate'>
<td class='gift-certificate-label label'>{{labels.giftCertificateField}}
{{giftCertificateCode}}
</td>
<td class='gift-certificate-field field'>{{giftCertificateAmountFormatted}}</td>
</tr>
{{/if}}
<tr class='total'>
<td class='total-label label'>{{labels.totalField}}</td>
<td class='total-field field'>{{totalFormatted}}
{{#if totalRefunded}}
<span class='total-refund refund'>{{totalRefundedFormatted}}</span>
{{/if}}
</td>
</tr>
</table>
</td>
</tr>
{{#if showCurrencyWarning}}
{{startSection classes="currency-conversion order-section"}}
<tr class='currency-conversion-msg1'>
<td>{{currencyWarning}}</td>
</tr>
<tr class='currency-conversion-msg2'>
<td>{{labels.yourActualMessage}}</td>
</tr>
{{endSection}}
{{/if}}
{{#if giftMessage}}
<tr>
<td class='gift-message-section text-block order-section'>
<table>
<tr>
<td class='gift-message-header section-header'>Gift Message</td>
</tr>
{{#each giftMessage}}
<tr>
<td>{{this}}</td>
</tr>
{{/each}}
</table>
</td>
</tr>
{{/if}}
{{#if specialInstructions}}
<tr>
<td class='special-instructions-section text-block order-section'>
<table>
<tr>
<td class='special-instructions-header section-header'>Special Instructions</td>
</tr>
{{#each specialInstructions}}
<tr>
<td>{{this}}</td>
</tr>
{{/each}}
</table>
</td>
</tr>
{{/if}}
</table>
{{! end of order table }}
<div style='clear:both'></div>
</div>
</script>
</head>
<body>
<!-- The page header typically contains items such as your site heading, logo and possibly the main site navigation -->
<!-- ARIA: the landmark role "banner" is set as it is the prime heading or internal title of the page -->
<header role="banner">
<img src='images/logo.png' alt='store logo' class='logo-image'/>
<h2>UltraCart Store</h2>
<h4><a href="index.html">My Account</a> > <a href="orders.html">My Orders</a> ><span
class='disabled-looking'>Order Detail</span></h4>
</header>
<div class="wrap content">
<main role='main' id='order'></main>
</div>
<footer role="contentinfo">
<!-- Copyright information can be contained within the <small> element. The <time> element is used here to indicate that the '2015' is a date -->
<small>Copyright www.ultracart.com ©
<time datetime="2015">2015</time>
</small>
</footer>
<!-- Google Analytics - Optimized version by Mathias Bynens -->
<!-- See: http://mathiasbynens.be/notes/async-analytics-snippet -->
<!-- Change the UA-XXXX-XX string to your site's ID -->
<script type='text/javascript'>
var _gaq = [
['_setAccount', 'UA-XXXX-XX'],
['_trackPageview']
];
(function (a, b) {
var c = a.createElement(b), d = a.getElementsByTagName(b)[0];
c.src = ("https:" == location.protocol ? "//ssl" : "//www") + ".google-analytics.com/ga.js";
d.parentNode.insertBefore(c, d)
})(document, "script");
</script>
</body>
</html>