expressCart/views/themes/Cloth/cart.hbs

83 lines
4.1 KiB
Handlebars
Raw Normal View History

<div class="panel panel-default" style="margin-top: 30px;">
<div class="panel-heading">{{ @root.__ "Cart contents" }}</div>
<div class="panel-body cart-body">
<div class="container-fluid">
{{#each @root.session.cart}}
<div class="row cart-row">
<div class="col-xs-4 col-md-2 col s4 m2">
{{#if productImage}}
<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}}
</div>
<div class="cart-item-row text-left col-xs-12 col-md-7 col s12 m7">
<p>
<a class="cart-link" href="/product/{{this.link}}">{{this.title}}</a>
</p>
<p>
&nbsp;
{{#each this.options}}
{{#if @last}}
{{@key}}: {{this}}
{{else}}
{{@key}}: {{this}} /
{{/if}}
{{/each}}
</p>
<p>
<div class="form-group">
<div class="col-lg-5 col l5 no-pad-left">
<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}}" data-index="{{@key}}"
maxlength="2" value="{{this.quantity}}">
<span class="input-group-btn">
<button class="btn btn-sm btn-primary btn-qty-add" type="button">+</button>
2018-05-21 23:36:12 +10:00
</span>
2018-01-07 04:55:48 +10:00
</div>
</div>
<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>
<div class="col-xs-12 col-lg-4 col s12 l4 cart-item-row text-right no-pad-right">
<strong>{{currencySymbol ../config.currencySymbol}}{{formatAmount this.totalItemPrice}}</strong>
2018-01-07 04:55:48 +10:00
</div>
</div>
{{/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}}
<div class="row">
<div class="cart-contents-shipping col-md-12 col m12 no-pad-right">
{{#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>
{{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>
{{/if}}
2018-01-07 04:55:48 +10:00
</div>
2018-02-05 07:39:42 +10:00
</div>
</div>