frontend: order result screen
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
19aeb032b5
commit
91493bf0a3
4 changed files with 57 additions and 9 deletions
|
@ -123,7 +123,11 @@
|
|||
<label for="credit_card_expiration_year">Year</label>
|
||||
<select name="credit_card_expiration_year" id="credit_card_expiration_year"
|
||||
class="form-control">
|
||||
{{range $.expiration_years}}<option value="{{.}}">{{.}}</option>{{end}}
|
||||
{{ range $i, $y := $.expiration_years}}<option value="{{$y}}"
|
||||
{{if eq $i 1 -}}
|
||||
selected="selected"
|
||||
{{- end}}
|
||||
>{{$y}}</option>{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2 mb-3">
|
||||
|
|
17
src/frontend/templates/error.html
Normal file
17
src/frontend/templates/error.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ define "error" }}
|
||||
{{ template "header" }}
|
||||
|
||||
<main role="main">
|
||||
<div class="py-5">
|
||||
<div class="container bg-light py-3 px-lg-5 py-lg-5">
|
||||
<h1>Uh, oh!</h1>
|
||||
<p>Something has failed. Below are some details for debugging.</p>
|
||||
<pre>
|
||||
{{.errorMsg}}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ template "footer" }}
|
||||
{{ end }}
|
|
@ -3,15 +3,32 @@
|
|||
|
||||
<main role="main">
|
||||
<div class="py-5">
|
||||
<div class="container bg-light py-3 px-lg-5 py-lg-5">
|
||||
<h3>
|
||||
Your order is complete!
|
||||
</h3>
|
||||
<p>
|
||||
Order Confirmation ID: {{ $.order }}
|
||||
</p>
|
||||
<div class="container bg-light py-3 px-lg-5">
|
||||
<div class="row mt-5 py-2">
|
||||
<div class="col">
|
||||
<h3>
|
||||
Your order is complete!
|
||||
</h3>
|
||||
<p>
|
||||
Order Confirmation ID: <strong>{{.order.OrderId}}</strong>
|
||||
<br>
|
||||
Shipping Tracking ID: <strong>{{.order.ShippingTrackingId}}</strong>
|
||||
</p>
|
||||
<p>
|
||||
Shipping Cost: <strong>{{renderMoney .order.ShippingCost}}</strong>
|
||||
<br>
|
||||
Total Paid: <strong>{{renderMoney .total_paid}}</strong>
|
||||
</p>
|
||||
<a class="btn btn-primary" href="/" role="button">Browse other products → </a>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
{{ template "recommendations" $.recommendations }}
|
||||
{{ if $.recommendations }}
|
||||
<div class="row mt-5 py-2">
|
||||
{{ template "recommendations" $.recommendations }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue