2019-12-21 12:46:48 +10:00
|
|
|
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="card top-marg-15 bottom-marg-15">
|
|
|
|
<div class="card-body cart-body">
|
|
|
|
<h5 class="card-title">{{ @root.__ "Cart contents" }}</h5>
|
|
|
|
{{#each @root.session.cart}}
|
|
|
|
<div class="d-flex flex-row bottom-pad-15">
|
|
|
|
<div class="col-xs-4 col-md-3">
|
|
|
|
{{#if productImage}}
|
|
|
|
<img class="img-fluid" src="{{this.productImage}}" alt="{{this.title}} product image"> {{else}}
|
|
|
|
<img class="img-fluid" src="/uploads/placeholder.png" alt="{{this.title}} product image"> {{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12 col-md-7">
|
|
|
|
<div class="row h-200">
|
|
|
|
<div class="col-sm-12 text-left no-pad-left">
|
|
|
|
<h6><a href="/product/{{this.link}}">{{this.title}}</a></h6>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12 text-left no-pad-left">
|
|
|
|
{{#each this.options}}
|
|
|
|
{{#if @last}}
|
|
|
|
{{@key}}: {{this}}
|
|
|
|
{{else}}
|
|
|
|
{{@key}}: {{this}} /
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{#ifCond cartReadOnly '!=' true}}
|
|
|
|
<div class="col-md-8 no-pad-left">
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<button class="btn btn-outline-primary btn-qty-minus" type="button">-</button>
|
|
|
|
</div>
|
2019-12-26 20:32:28 +10:00
|
|
|
<input type="number" class="form-control cart-product-quantity text-center" data-id="{{../this.productId}}" data-index="{{@key}}"
|
2019-12-26 13:23:21 +10:00
|
|
|
maxlength="2" value="{{../this.quantity}}">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<button class="btn btn-outline-primary btn-qty-add" type="button">+</button>
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-26 13:23:21 +10:00
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-right">
|
|
|
|
<button class="btn btn-outline-danger btn-delete-from-cart" data-id="{{../this.productId}}" type="button"><i class="fa fa-trash" data-id="{{../this.productId}}" aria-hidden="true"></i></button>
|
|
|
|
</div>
|
|
|
|
{{/ifCond}}
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="align-self-center col-sm-12 col-md-2 text-right no-pad-right">
|
|
|
|
<strong class="my-auto">{{currencySymbol @root.config.currencySymbol}}{{formatAmount this.totalItemPrice}}</strong>
|
|
|
|
</div>
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
2019-12-26 13:23:21 +10:00
|
|
|
{{/each}}
|
2019-12-21 12:46:48 +10:00
|
|
|
<div class="container-fluid">
|
2019-11-03 19:34:20 +10:00
|
|
|
{{#if @root.session.cart}}
|
2019-12-21 12:46:48 +10:00
|
|
|
<div class="row">
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="cart-contents-shipping col-md-12 no-pad-right">
|
2019-12-21 12:46:48 +10:00
|
|
|
{{#ifCond @root.session.shippingCostApplied '===' true}}
|
|
|
|
<div class="text-right">
|
|
|
|
{{ @root.__ "Shipping" }}
|
|
|
|
<strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.config.flatShipping}}</strong>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="text-right">
|
|
|
|
{{ @root.__ "Shipping" }}
|
|
|
|
<strong>FREE</strong>
|
|
|
|
</div>
|
|
|
|
{{/ifCond}}
|
|
|
|
<div class="text-right">
|
|
|
|
Total:
|
|
|
|
<strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartAmount}}</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-02-05 07:39:42 +10:00
|
|
|
</div>
|
2019-12-21 12:46:48 +10:00
|
|
|
{{else}}
|
|
|
|
<div class="row">
|
|
|
|
<div class="cart-contents-shipping col-md-12 no-pad-right">
|
|
|
|
Cart empty
|
|
|
|
</div>
|
2018-02-05 07:39:42 +10:00
|
|
|
</div>
|
2019-12-21 12:46:48 +10:00
|
|
|
{{/if}}
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
2018-02-05 07:39:42 +10:00
|
|
|
</div>
|
2019-12-21 12:46:48 +10:00
|
|
|
</div>
|