Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 1 | {% block title %} {{ title }} {% endblock %} |
| 2 | |
| 3 | {% block header %}<h2>{{ title }}</h2>{% endblock %} |
| 4 | |
Rushabh Mehta | aded46d | 2015-06-01 17:23:42 +0530 | [diff] [blame] | 5 | {% block header_actions %} |
| 6 | {% include 'templates/includes/product_search_box.html' %} |
| 7 | {% endblock %} |
| 8 | |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 9 | {% block content %} |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 10 | {% from "erpnext/templates/includes/macros.html" import product_image %} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 11 | <div class="item-content"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 12 | <div class="product-page-content" itemscope itemtype="http://schema.org/Product"> |
| 13 | <div class="row"> |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 14 | <div class="col-sm-5"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 15 | {% if slideshow %} |
| 16 | {% include "templates/includes/slideshow.html" %} |
| 17 | {% else %} |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 18 | {{ product_image(website_image, "product-full-image") }} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 19 | {% endif %} |
| 20 | </div> |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 21 | <div class="col-sm-7"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 22 | <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> --> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 23 | <div itemprop="description"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 24 | {{ web_long_description or description or _("No description given") }} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 25 | </div> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 26 | <p class="text-muted"> |
Anand Doshi | 6d69ca6 | 2015-10-29 11:35:16 +0530 | [diff] [blame^] | 27 | {{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 28 | <br> |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 29 | <div class="item-attribute-selectors"> |
| 30 | {% if has_variants %} |
| 31 | {% for d in attributes %} |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 32 | {% if attribute_values[d.attribute] -%} |
| 33 | <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}" |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 34 | style="margin-bottom: 10px;"> |
| 35 | <h6 class="text-muted">{{ _(d.attribute) }}</h6> |
| 36 | <select class="form-control" |
| 37 | style="max-width: 140px" |
| 38 | data-attribute="{{ d.attribute }}"> |
| 39 | {% for value in attribute_values[d.attribute] %} |
| 40 | <option value="{{ value }}" |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 41 | {% if selected_attributes and selected_attributes[d.attribute]==value -%} |
| 42 | selected |
| 43 | {%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%} |
| 44 | disabled |
| 45 | {%- endif %}> |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 46 | {{ _(value) }} |
| 47 | </option> |
| 48 | {% endfor %} |
| 49 | </select> |
| 50 | </div> |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 51 | {%- endif %} |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 52 | {% endfor %} |
| 53 | {% endif %} |
| 54 | </div> |
| 55 | <br> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 56 | <div style="min-height: 100px; margin: 10px 0;"> |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 57 | <h4 class="item-price" itemprop="price"></h4> |
| 58 | <div class="item-stock" itemprop="availablity"></div> |
| 59 | <div class="item-cart hide"> |
| 60 | <div id="item-add-to-cart"> |
| 61 | <button class="btn btn-primary btn-sm"> |
| 62 | {{ _("Add to Cart") }}</button> |
| 63 | </div> |
| 64 | <div id="item-update-cart" |
| 65 | style="display: none; |
| 66 | padding-left: 0px; padding-right: 0px; |
| 67 | padding-top: 10px;"> |
| 68 | <div> |
| 69 | <input class="form-control" |
| 70 | type="text" style="max-width: 140px;"> |
| 71 | </div> |
| 72 | <div style="margin-top: 10px;"> |
| 73 | <button class="btn btn-default btn-sm"> |
| 74 | {{ _("Update") }}</button> |
| 75 | </div> |
| 76 | <div style="margin-top: 5px;"> |
| 77 | <a href="/cart" class="text-muted small"> |
| 78 | {{ _("View Cart") }}</a> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 82 | </div> |
| 83 | </div> |
| 84 | </div> |
Anand Doshi | 7c0eadb | 2015-10-20 17:30:02 +0530 | [diff] [blame] | 85 | {% if website_specifications -%} |
| 86 | <div class="row item-website-specification" style="margin-top: 20px"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 87 | <div class="col-md-12"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 88 | <h4>{{ _("Specifications") }}</h4> |
Anand Doshi | 7c0eadb | 2015-10-20 17:30:02 +0530 | [diff] [blame] | 89 | |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 90 | <table class="table table-bordered" style="width: 100%"> |
Anand Doshi | 7c0eadb | 2015-10-20 17:30:02 +0530 | [diff] [blame] | 91 | {% for d in website_specifications -%} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 92 | <tr> |
| 93 | <td style="width: 30%;">{{ d.label }}</td> |
| 94 | <td>{{ d.description }}</td> |
| 95 | </tr> |
| 96 | {%- endfor %} |
| 97 | </table> |
| 98 | </div> |
| 99 | </div> |
| 100 | {%- endif %} |
| 101 | </div> |
| 102 | </div> |
| 103 | <script> |
| 104 | {% include "templates/includes/product_page.js" %} |
| 105 | |
Rushabh Mehta | 80d2a55 | 2015-10-05 16:27:52 +0530 | [diff] [blame] | 106 | {% if variant_info %} |
| 107 | window.variant_info = {{ variant_info }}; |
Rushabh Mehta | 6e322d0 | 2015-10-07 14:30:19 +0530 | [diff] [blame] | 108 | {% else %} |
| 109 | window.variant_info = null; |
Rushabh Mehta | 80d2a55 | 2015-10-05 16:27:52 +0530 | [diff] [blame] | 110 | {% endif %} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 111 | </script> |
| 112 | {% endblock %} |