expressCart/views/themes/Cloth/cart.hbs

110 lines
5.9 KiB
Handlebars
Raw Normal View History

2018-02-05 07:39:42 +10:00
<div class="row">
2018-02-14 06:21:22 +10:00
<div class="col-xs-12 col s12">
2018-01-07 04:55:48 +10:00
{{#if pageCloseBtn}}
<div class="row {{checkout}}">
2018-02-14 06:21:22 +10:00
<div class="col-lg-12 col l12 text-right">
2018-01-07 04:55:48 +10:00
<button class="pushy-link btn btn-primary" type="button">X</button>
</div>
</div>
{{/if}}
<div class="panel panel-default" style="margin-top: 30px;">
<div class="panel-heading">{{ @root.__ "Cart contents" }}</div>
2018-01-07 04:55:48 +10:00
<div class="panel-body cart-body">
<div class="container-fluid">
2019-11-03 19:34:20 +10:00
{{#each @root.session.cart}}
2018-01-07 04:55:48 +10:00
<div class="row cart-row">
2018-02-14 06:21:22 +10:00
<div class="col-xs-4 col-md-2 col s4 m2">
2018-01-07 04:55:48 +10:00
{{#if productImage}}
2018-02-05 07:39:42 +10:00
<img class="img-responsive" src="{{this.productImage}}" alt="{{this.title}} product image"> {{else}}
<img class="img-responsive" src="/uploads/placeholder.png" alt="{{this.title}} product image"> {{/if}}
2018-01-07 04:55:48 +10:00
</div>
2018-02-14 06:21:22 +10:00
<div class="cart-item-row text-left col-xs-12 col-md-7 col s12 m7">
2018-01-07 04:55:48 +10:00
<p>
2018-02-05 07:39:42 +10:00
<a class="cart-link" href="/product/{{this.link}}">{{this.title}}</a>
</p>
<p>
2019-02-10 13:46:42 +10:00
&nbsp;
{{#each this.options}}
{{#if @last}}
{{@key}}: {{this}}
{{else}}
{{@key}}: {{this}} /
{{/if}}
{{/each}}
2018-01-07 04:55:48 +10:00
</p>
<p>
2018-02-05 07:39:42 +10:00
<div class="form-group">
2018-02-14 06:21:22 +10:00
<div class="col-lg-5 col l5 no-pad-left">
2018-02-05 07:39:42 +10:00
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-sm btn-primary btn-qty-minus" type="button">-</button>
</span>
<input type="number" class="form-control cart-product-quantity input-sm text-center" data-id="{{this.productId}}" id="{{@key}}"
maxlength="2" value="{{this.quantity}}">
<span class="input-group-btn">
<button class="btn btn-sm btn-primary btn-qty-add" type="button">+</button>
</span>
</div>
2018-01-07 04:55:48 +10:00
</div>
2018-05-21 23:36:12 +10:00
<span class="pull-right">
<button class="btn btn-sm btn-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>
</span>
2018-01-07 04:55:48 +10:00
</div>
</p>
</div>
2018-02-14 06:21:22 +10:00
<div class="col-xs-12 col-lg-4 col s12 l4 cart-item-row text-right no-pad-right">
2018-01-07 04:55:48 +10:00
<strong>{{currencySymbol ../config.currencySymbol}}{{formatAmount this.totalItemPrice}}</strong>
2018-02-05 07:39:42 +10:00
</div>
2018-01-07 04:55:48 +10:00
</div>
2018-02-05 07:39:42 +10:00
{{/each}}
2018-01-07 04:55:48 +10:00
</div>
<div class="container-fluid">
2019-11-03 19:34:20 +10:00
{{#if @root.session.cart}}
2018-01-07 04:55:48 +10:00
<div class="row">
2018-02-14 06:21:22 +10:00
<div class="cart-contents-shipping col-md-12 col m12 no-pad-right">
2019-11-03 19:34:20 +10:00
{{#ifCond @root.session.shippingCostApplied '===' true}}
2018-02-05 07:39:42 +10:00
<div class="text-right">
<strong>{{currencySymbol config.currencySymbol}}{{formatAmount config.flatShipping}}</strong>
{{ @root.__ "Shipping" }}
2019-11-03 19:34:20 +10:00
<strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.config.flatShipping}}</strong>
2018-02-05 07:39:42 +10:00
</div>
{{else}}
<div class="text-right">
{{ @root.__ "Shipping" }}
2018-02-05 07:39:42 +10:00
<strong>FREE</strong>
</div>
2018-01-07 04:55:48 +10:00
{{/ifCond}}
<div class="text-right">
2018-02-05 07:39:42 +10:00
Total:
2019-11-03 19:34:20 +10:00
<strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartAmount}}</strong>
2018-01-07 04:55:48 +10:00
</div>
</div>
</div>
2018-02-05 07:39:42 +10:00
{{else}}
<div class="row">
<div class="cart-contents-shipping col-md-12 no-pad-right">
Cart empty
</div>
</div>
{{/if}}
2018-01-07 04:55:48 +10:00
</div>
</div>
</div>
<div class="row">
2019-11-03 19:34:20 +10:00
{{#if @root.session.cart}}
2018-02-14 06:21:22 +10:00
<div class="col-xs-6 col s6 text-left align-right">
<button class="btn btn-danger" id="empty-cart" type="button">{{ @root.__ "Empty cart" }}</button>
2018-02-05 07:39:42 +10:00
</div>
{{#ifCond page '!=' 'pay'}}
2018-02-14 06:21:22 +10:00
<div class="text-right align-right col-xs-6 col s6">
2019-10-29 17:53:48 +10:00
{{#ifCond @root.page '==' 'checkout'}}
<a href="/pay" class="btn btn-default">{{ @root.__ "Pay now" }}</a>
2018-02-05 07:39:42 +10:00
{{else}}
<a href="/checkout" class="btn btn-default">Checkout</a>
2018-01-07 04:55:48 +10:00
{{/ifCond}}
2018-02-05 07:39:42 +10:00
</div>
{{/ifCond}} {{/if}}
2018-01-07 04:55:48 +10:00
</div>
2018-02-05 07:39:42 +10:00
</div>
</div>