Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
309 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[api] | ||
api_host = | ||
api_key = | ||
api_access = | ||
|
||
[dir] | ||
watch_dir = | ||
file_patterns = [ "*.js","*.css","*.htm", "*.jpg", "*.yaml", "*.ico", "*.png" ] | ||
ignore_patterns = [ "*.tmp", "*.TMP", "*/.git*" ] | ||
|
||
[store] | ||
store_host = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- Modal --> | ||
<div class="modal fade" id="writeModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<h2 class="modal-title" id="myModalLabel">Review {{ product.name }}</h2> | ||
</div> | ||
<div class="modal-body"> | ||
{{ flash() }} | ||
{{ open_form({'data-ajax-handler': 'system:onSendMessage'}) }} | ||
|
||
<div class="row"> | ||
<div> | ||
<input type="text" class="input-sm form-control" id="contact_name" name="fields[name]" value="" placeholder="Your name"/> | ||
<span class="error"/><br><br> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div> | ||
<input type="text" class="input-sm form-control" id="contact_email" name="fields[email]" value="" placeholder="Email address"/> | ||
<span class="error"/><br><br> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div> | ||
<input type="text" class="input-sm form-control" id="subject" name="fields[subject]" value="" placeholder="Title for your review"/> | ||
<span class="error"/><br><br> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div> | ||
<textarea class="input-sm form-control" id="contact_message" name="fields[message]" value="" rows="10" placeholder="Your review"></textarea> | ||
<span class="error"/> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="rating"> | ||
<span id="love">☆</span><span id="like">☆</span><span id="ok">☆</span><span id="dont-like">☆</span><span id="hate">☆</span> | ||
<p> </p> | ||
</div> | ||
<div> | ||
<select style="display:none" id="item_rating" name="fields[item_rating]"> | ||
<option value="" diabled>-</option> | ||
<option value="1">★☆☆☆☆</option> | ||
<option value="2">★★☆☆☆</option> | ||
<option value="3">★★★☆☆</option> | ||
<option value="4">★★★★☆</option> | ||
<option value="5">★★★★★</option> | ||
</select> | ||
<span class="error"/> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<div class="modal-footer"> | ||
<input type="submit" class="btn btn-important" value="Submit" style="width: 100%"/> | ||
<input type="text" name="hp" value="" style="display: none"/> | ||
<input type="hidden" name="fields[shop_customer_id]" value="{{customer.id}}"/> | ||
<input type="hidden" name="fields[shop_product_id]" value="{{product.id}}"/> | ||
<input type="hidden" name="template" value="system:product-review"/> | ||
<input type="hidden" name="fields[message_type]" value="review"/> | ||
</div> | ||
{{ close_form() }} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!-- Modal --> | ||
<div class="modal fade" id="viewModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<h2 class="modal-title" id="myModalLabel">{{ product.name }}</h2> | ||
{% set product_rating = product.rating() %} | ||
<div class="review-header"> | ||
<p> | ||
{% if product_rating.total_reviews %} | ||
<span style="margin-right: -4px"> | ||
{% for i in range(1, product_rating.average_int) %}★{% endfor %} | ||
</span> | ||
{% if product_rating.average_int != 5 %} | ||
{% for i in range(1, 5 - product_rating.average_int) %}☆{% endfor %} | ||
{% endif %} | ||
Based on {{ product_rating.total_reviews }} Reviews | ||
{% endif %} | ||
</p> | ||
</div> | ||
<div class="review-header" style="text-align: right"> | ||
<strong><a href="#reviews" data-dismiss="modal" >Write a Review</a></strong> | ||
</div> | ||
</div> | ||
<div class="modal-body"> | ||
|
||
<div class="reviews"> | ||
|
||
<div> | ||
|
||
{% for review in product.reviews() %} | ||
|
||
{% if review.item_rating == 5 %} | ||
<div class="review-body">★★★★★</div> | ||
{% endif %} | ||
{% if review.item_rating == 4 %} | ||
<div class="review-body">★★★★☆</div> | ||
{% endif %} | ||
{% if review.item_rating == 3 %} | ||
<div class="review-body">★★★☆☆</div> | ||
{% endif %} | ||
{% if review.item_rating == 2 %} | ||
<div class="review-body">★★☆☆☆</div> | ||
{% endif %} | ||
{% if review.item_rating == 1 %} | ||
<div class="review-body">★☆☆☆☆</div> | ||
{% endif %} | ||
|
||
<div class="review-body" style="text-align: right; font-size: 1.1rem;"> | ||
<p>{{ review.created_at|date('M jS, Y') }}</p> | ||
|
||
</div> | ||
<div class="review-body" > | ||
|
||
<p><strong>{{ review.title }}</strong></p> | ||
<p><em>{{ review.comment }}</em></p> | ||
</div> | ||
<div class="review-body" style="text-align: right; font-size: 1.1rem;"> | ||
<p>{{ review.from_name }}</p> | ||
</div> | ||
|
||
|
||
<hr> | ||
|
||
{% endfor %} | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.