expressCart/views/themes/Cloth/product.hbs

98 lines
5.0 KiB
Handlebars
Raw Normal View History

2018-02-12 05:47:26 +10:00
{{> themes/Cloth/front-menu}}
2018-01-07 04:55:48 +10:00
<div class="product-layout col-md-8 col-md-offset-2">
<div class="row">
<div class="col-xs-12 col-md-6 pull-right">
<div class="row">
<h1 class="col-md-10 product-title">{{result.productTitle}}</h1>
<h4 class="col-md-10 product-price">{{currencySymbol config.currencySymbol}}{{result.productPrice}}</h4>
{{#if productOptions}}
<h4 class="col-md-10 product-option">{{ @root.__ "Options" }}</h4>
<div class="col-md-10">
{{#each productOptions}}
{{#ifCond this.optType '==' "select"}}
<strong>{{this.optName}}</strong>
<select name="opt-{{this.optName}}" class="form-control product-opt">
{{#each ../this.optOptions}}
<option value="{{this}}">{{this}}</option>
{{/each}}
</select>
{{/ifCond}}
{{#ifCond this.optType '==' "radio"}}
{{#each ../this.optOptions}}
<strong>{{this.optName}}</strong>
<div class="radio">
<label>
<input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}">
{{this}}
</label>
</div>
2018-01-07 04:55:48 +10:00
{{/each}}
{{/ifCond}}
{{#ifCond this.optType '==' "checkbox"}}
<div class="checkbox">
2018-01-07 04:55:48 +10:00
<label>
<input type="checkbox" class="product-opt" name="opt-{{../this.optName}}" value="{{../this.optName}}"><strong>{{../this.optName}}</strong>
2018-01-07 04:55:48 +10:00
</label>
</div>
{{/ifCond}}
{{/each}}
</div>
{{/if}}
2019-02-10 13:55:31 +10:00
{{#if config.trackStock}}
{{#ifCond result.productStock '==' 0}}
<div class="col-md-10">
<h4 class="text-danger text-center">
Out of stock
</h4>
</div>
{{/ifCond}}
{{/if}}
<div class="col-md-10 productOptions">
<p class="product-option-text">{{ @root.__ "Quantity" }}</p>
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-primary qty-btn-minus" type="button">-</button>
</span>
<input type="text" class="form-control add-color text-center" id="product_quantity" maxlength="3" value="1">
<span class="input-group-btn">
<button class="btn btn-primary qty-btn-plus" type="button">+</button>
</span>
</div>
2018-01-07 04:55:48 +10:00
</div>
{{#if result.productComment}}
<div class="col-md-10">
{{ @root.__ "Leave a comment?" }}
<textarea class="form-control" id="product_comment"></textarea>
</div>
{{/if}}
<div class="col-md-10 btnAddToCart">
<button class="btn btn-primary btn-block product-add-to-cart" type="button">{{ @root.__ "Add to cart" }}</button>
</div>
<div class="col-md-10 body_text">
{{{productDescription}}}
2018-01-07 04:55:48 +10:00
</div>
</div>
</div>
2018-02-12 05:47:26 +10:00
<div class="col-xs-12 col-md-6 pull-left">
2018-01-07 04:55:48 +10:00
{{#if result.productImage}}
<div class="title-image-container">
<div class="image-prev image-button"> <i class="fa fa-chevron-left" aria-hidden="true"></i></div>
<img src="{{result.productImage}}" id="product-title-image" class="product-title-image img-responsive" alt="...">
<div class="image-next image-button"> <i class="fa fa-chevron-right" aria-hidden="true"></i></div>
2018-02-12 05:47:26 +10:00
</div>
2018-01-07 04:55:48 +10:00
{{else}}
<div class="title-image-container">
<img src="/uploads/placeholder.png" id="product-title-image" class="product-title-image img-responsive" alt="...">
</div>
{{/if}}
{{#ifCond images.length '>' 1}}
2018-02-12 05:47:26 +10:00
{{#each images}}
2018-01-07 04:55:48 +10:00
<div class="vertical-center top-pad-20 col-xs-6 col-lg-6 col-xl-6">
<img src="{{this.path}}" class="thumbnail-image img-responsive">
</div>
{{/each}}
2018-02-12 05:47:26 +10:00
{{/ifCond}}
2018-01-07 04:55:48 +10:00
</div>
2018-02-12 05:47:26 +10:00
</div>
2018-01-07 04:55:48 +10:00
</div>
<input type="hidden" id="productId" value="{{result._id}}">