attempt to fix breaking build
This commit is contained in:
parent
969b59776e
commit
0cac12b9b5
3 changed files with 13 additions and 12 deletions
|
@ -266,6 +266,8 @@ func (fe *frontendServer) viewCartHandler(w http.ResponseWriter, r *http.Request
|
|||
}
|
||||
totalPrice = money.Must(money.Sum(totalPrice, *shippingCost))
|
||||
|
||||
log.Info("🌈 ITEMS: %v", items)
|
||||
|
||||
year := time.Now().Year()
|
||||
if err := templates.ExecuteTemplate(w, "cart", map[string]interface{}{
|
||||
"session_id": sessionID(r),
|
||||
|
@ -276,8 +278,6 @@ func (fe *frontendServer) viewCartHandler(w http.ResponseWriter, r *http.Request
|
|||
"cart_size": cartSize(cart),
|
||||
"shipping_cost": shippingCost,
|
||||
"total_cost": totalPrice,
|
||||
"banner_color": os.Getenv("BANNER_COLOR"), // illustrates canary deployments
|
||||
"ad": fe.chooseAd(r.Context(), []string{}, log),
|
||||
"items": items,
|
||||
"expiration_years": []int{year, year + 1, year + 2, year + 3, year + 4},
|
||||
"platform_css": plat.css,
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<h3>Begin range items</h3>
|
||||
{{ range $.items }}
|
||||
<div class="product-item">
|
||||
<div class="row pt-2 mb-2">
|
||||
|
@ -38,20 +38,21 @@
|
|||
src="{{.Item.Picture}}" /></a>
|
||||
</div>
|
||||
<div class="col text-left text">
|
||||
<h4>{{.Item.Name}}</h4>
|
||||
<p><small class="text-muted">SKU: #{{.Item.Id}}</small></p>
|
||||
<h4>{{ .Item.Name }}</h4>
|
||||
<p><small class="text-muted">SKU: #{{ .Item.Id }}</small></p>
|
||||
<div class="details">
|
||||
Quantity: {{.Quantity}}<br/>
|
||||
Quantity: {{ .Quantity }}<br/>
|
||||
<strong>
|
||||
{{ renderMoney .Price}}
|
||||
{{ renderMoney .Price }}
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }} <!-- range $.items-->
|
||||
|
||||
{{ end }}
|
||||
<h3>End range items</h3>
|
||||
|
||||
<h3>Begin checkout</h3>
|
||||
<div class="row pt-2 my-3">
|
||||
<div class="col text-center order-summary">
|
||||
<p class="text-muted my-0">Shipping Cost: <strong>{{ renderMoney .shipping_cost }}</strong></p>
|
||||
|
@ -59,7 +60,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
<div class="row py-3 my-2 checkout">
|
||||
<div class="col-12 col-lg-8 offset-lg-2">
|
||||
<h3 class="text-center">Checkout</h3>
|
||||
|
@ -140,7 +140,7 @@
|
|||
</div>
|
||||
<div class="col-md-2 mb-3">
|
||||
<label for="credit_card_cvv">CVV</label>
|
||||
<input type="text" class="form-control" id="credit_card_cvv"
|
||||
<input type="password" class="form-control" id="credit_card_cvv"
|
||||
name="credit_card_cvv" value="672" required pattern="\d{3}">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -150,6 +150,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<h3>End checkout, if items</h3>
|
||||
{{ end }} <!-- end if $.items -->
|
||||
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</h5>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<small class="text-muted">
|
||||
- {{ renderMoney .Price }} -
|
||||
{{ renderMoney .Price }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue