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>
|
2020-01-04 17:10:58 +10:00
|
|
|
<div class="cartBodyWrapper">
|
2019-12-30 13:10:57 +10:00
|
|
|
{{#each @root.session.cart}}
|
|
|
|
<div class="d-flex flex-row bottom-pad-15">
|
2020-01-07 11:34:22 +10:00
|
|
|
<div class="p-2 cart-product">
|
2019-12-30 13:10:57 +10:00
|
|
|
<div class="row h-200">
|
2020-01-04 21:04:42 +10:00
|
|
|
<div class="col-4 col-md-3 no-pad-left">
|
|
|
|
{{#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}}
|
2019-12-30 13:10:57 +10:00
|
|
|
</div>
|
2020-01-04 21:04:42 +10:00
|
|
|
<div class="col-8 col-md-9">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 no-pad-left mt-md-4">
|
|
|
|
<h6><a href="/product/{{this.link}}">{{this.title}}</a></h6>
|
|
|
|
{{#each this.options}}
|
|
|
|
{{#if @last}}
|
|
|
|
<strong>{{#upperFirst this.name}}{{/upperFirst}}</strong>: {{this.value}}
|
|
|
|
{{else}}
|
|
|
|
<strong>{{#upperFirst this.name}}{{/upperFirst}}:</strong> {{this.value}} /
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{#ifCond @root.cartReadOnly '!=' true}}
|
|
|
|
<div class="col-12 col-md-6 no-pad-left mb-2">
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-prepend">
|
2020-01-21 17:36:46 +10:00
|
|
|
<button class="btn btn-primary btn-qty-minus" type="button">-</button>
|
2020-01-04 21:04:42 +10:00
|
|
|
</div>
|
2020-01-21 20:00:52 +10:00
|
|
|
<input type="number" class="form-control cart-product-quantity text-center" data-cartid="{{../this.productId}}" data-id="{{../this.id}}" maxlength="2" value="{{../this.quantity}}">
|
2020-01-04 21:04:42 +10:00
|
|
|
<div class="input-group-append">
|
2020-01-21 17:36:46 +10:00
|
|
|
<button class="btn btn-primary btn-qty-add" type="button">+</button>
|
2020-01-04 21:04:42 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-30 13:10:57 +10:00
|
|
|
</div>
|
2020-01-04 21:04:42 +10:00
|
|
|
<div class="col-4 col-md-2 no-pad-left">
|
2020-02-01 18:54:11 +10:00
|
|
|
<button class="btn btn-danger btn-delete-from-cart" data-id="{{../this.productId}}" data-cartid="{{../this.productId}}" type="button">{{{feather 'trash-2'}}}</button>
|
2020-01-04 21:04:42 +10:00
|
|
|
</div>
|
2020-01-06 17:11:01 +10:00
|
|
|
{{else}}
|
2020-01-07 11:34:22 +10:00
|
|
|
<div class="col-12 col-md-8 no-pad-left mb-2"></div>
|
2020-01-04 21:04:42 +10:00
|
|
|
{{/ifCond}}
|
|
|
|
<div class="col-8 col-md-4 align-self-center text-right">
|
|
|
|
<strong class="my-auto">{{currencySymbol @root.config.currencySymbol}}{{formatAmount this.totalItemPrice}}</strong>
|
2019-12-30 13:10:57 +10:00
|
|
|
</div>
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-26 13:23:21 +10:00
|
|
|
</div>
|
2019-12-30 13:10:57 +10:00
|
|
|
</div>
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
2019-12-30 13:10:57 +10:00
|
|
|
{{/each}}
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
2020-01-07 11:34:22 +10:00
|
|
|
<div class="cartTotalsWrapper">
|
2019-11-03 19:34:20 +10:00
|
|
|
{{#if @root.session.cart}}
|
2020-01-07 11:34:22 +10:00
|
|
|
<div class="d-flex flex-row">
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="cart-contents-shipping col-md-12 no-pad-right">
|
2020-01-04 17:10:58 +10:00
|
|
|
{{#ifCond @root.session.totalCartShipping '>' 0}}
|
2019-12-21 12:46:48 +10:00
|
|
|
<div class="text-right">
|
2020-01-04 17:26:30 +10:00
|
|
|
{{@root.session.shippingMessage}}: <strong id="shipping-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong>
|
2019-12-21 12:46:48 +10:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="text-right">
|
2020-01-04 17:26:30 +10:00
|
|
|
<span id="shipping-amount">{{@root.session.shippingMessage}}</span>
|
2019-12-21 12:46:48 +10:00
|
|
|
</div>
|
|
|
|
{{/ifCond}}
|
2020-01-21 17:36:46 +10:00
|
|
|
{{#ifCond @root.session.totalCartDiscount '>' 0}}
|
|
|
|
<div class="text-right">
|
|
|
|
Discount: <strong id="discount-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartDiscount}}</strong>
|
|
|
|
</div>
|
|
|
|
{{/ifCond}}
|
2019-12-21 12:46:48 +10:00
|
|
|
<div class="text-right">
|
|
|
|
Total:
|
2020-01-04 12:37:35 +10:00
|
|
|
<strong id="total-cart-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartAmount}}</strong>
|
2019-12-21 12:46:48 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-02-05 07:39:42 +10:00
|
|
|
</div>
|
2019-12-21 12:46:48 +10:00
|
|
|
{{else}}
|
2020-01-07 11:34:22 +10:00
|
|
|
<div id="cart-empty" class="d-flex flex-row">
|
|
|
|
<div class="cart-contents-shipping col-md-12 no-pad-left">
|
2019-12-21 12:46:48 +10:00
|
|
|
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>
|