Rushabh Mehta | 51008f2 | 2016-01-01 17:23:12 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
| 2 | |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 3 | {% block title %} {{ title }} {% endblock %} |
| 4 | |
Anand Doshi | 13bf123 | 2016-01-04 17:50:40 +0530 | [diff] [blame] | 5 | {% block breadcrumbs %} |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 6 | {% include "templates/includes/breadcrumbs.html" %} |
Anand Doshi | 13bf123 | 2016-01-04 17:50:40 +0530 | [diff] [blame] | 7 | {% endblock %} |
| 8 | |
Rushabh Mehta | 51008f2 | 2016-01-01 17:23:12 +0530 | [diff] [blame] | 9 | {% block page_content %} |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 10 | {% from "erpnext/templates/includes/macros.html" import product_image %} |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 11 | <div class="item-content" style="margin-top:20px;"> |
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"> |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 14 | <div class="col-sm-6"> |
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> |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 21 | <div class="col-sm-6" style="padding-left:20px;"> |
| 22 | <h2 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h2> |
Rushabh Mehta | 4b9238a | 2016-05-12 15:22:59 +0530 | [diff] [blame] | 23 | |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 24 | <p class="text-muted"> |
Anand Doshi | 6d69ca6 | 2015-10-29 11:35:16 +0530 | [diff] [blame] | 25 | {{ _("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] | 26 | <br> |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 27 | <div class="item-attribute-selectors"> |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 28 | {% if has_variants %} |
| 29 | {% for d in attributes %} |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 30 | {% if attribute_values[d.attribute] -%} |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 31 | <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}" |
| 32 | style="margin-bottom: 10px;"> |
| 33 | <h6 class="text-muted">{{ _(d.attribute) }}</h6> |
| 34 | <select class="form-control" |
| 35 | style="max-width: 140px" |
| 36 | data-attribute="{{ d.attribute }}"> |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 37 | {% for value in attribute_values[d.attribute] %} |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 38 | <option value="{{ value }}" |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 39 | {% if selected_attributes and selected_attributes[d.attribute]==value -%} |
| 40 | selected |
| 41 | {%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%} |
| 42 | disabled |
| 43 | {%- endif %}> |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 44 | {{ _(value) }} |
| 45 | </option> |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 46 | {% endfor %} |
| 47 | </select> |
| 48 | </div> |
Anand Doshi | 3f3696d | 2015-10-26 19:57:31 +0530 | [diff] [blame] | 49 | {%- endif %} |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 50 | {% endfor %} |
| 51 | {% endif %} |
Anand Doshi | 25ef4ff | 2015-10-20 18:34:21 +0530 | [diff] [blame] | 52 | </div> |
| 53 | <br> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 54 | <div style="min-height: 100px; margin: 10px 0;"> |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 55 | <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> |
| 56 | <h4 class="item-price" itemprop="price"></h4> |
| 57 | <div class="item-stock" itemprop="availability"></div> |
Rushabh Mehta | 4b9238a | 2016-05-12 15:22:59 +0530 | [diff] [blame] | 58 | </div> |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 59 | <div class="item-cart hide"> |
britlog | d13985d | 2018-01-19 18:31:25 +0100 | [diff] [blame^] | 60 | <div id="item-spinner"> |
| 61 | <span style="display: inline-block"> |
| 62 | <div class="input-group number-spinner"> |
| 63 | <span class="input-group-btn"> |
| 64 | <button class="btn btn-default cart-btn" data-dir="dwn"> |
| 65 | –</button> |
| 66 | </span> |
| 67 | <input class="form-control text-right cart-qty" value="1"> |
| 68 | <span class="input-group-btn"> |
| 69 | <button class="btn btn-default cart-btn" data-dir="up" style="margin-left:-2px;"> |
| 70 | +</button> |
| 71 | </span> |
| 72 | </div> |
| 73 | </span> |
| 74 | </div> |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 75 | <div id="item-add-to-cart"> |
| 76 | <button class="btn btn-primary btn-sm"> |
| 77 | {{ _("Add to Cart") }}</button> |
| 78 | </div> |
| 79 | <div id="item-update-cart" style="display: none;"> |
| 80 | <a href="/cart" class='btn btn-sm btn-default'> |
| 81 | <i class='octicon octicon-check'></i> |
| 82 | {{ _("View in Cart") }}</a> |
| 83 | </div> |
| 84 | </div> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 85 | </div> |
| 86 | </div> |
| 87 | </div> |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 88 | <div class="row item-website-description" style="margin-top:30px; margin-bottom:20px"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 89 | <div class="col-md-12"> |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 90 | <div class="h6 text-uppercase">{{ _("Description") }}</div> |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 91 | <div itemprop="description" class="item-desc"> |
| 92 | {{ web_long_description or description or _("No description given") }} |
| 93 | </div> |
| 94 | </div> |
| 95 | </div> |
Rushabh Mehta | 4b9238a | 2016-05-12 15:22:59 +0530 | [diff] [blame] | 96 | |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 97 | {% if website_specifications -%} |
| 98 | <div class="row item-website-specification" style="margin-top: 40px"> |
| 99 | <div class="col-md-12"> |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 100 | <div class="h6 text-uppercase">{{ _("Specifications") }}</div> |
Anand Doshi | 7c0eadb | 2015-10-20 17:30:02 +0530 | [diff] [blame] | 101 | |
Kanchan Chauhan | 11638ba | 2016-04-20 16:20:49 +0530 | [diff] [blame] | 102 | <table class="table borderless" style="width: 100%"> |
Anand Doshi | 7c0eadb | 2015-10-20 17:30:02 +0530 | [diff] [blame] | 103 | {% for d in website_specifications -%} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 104 | <tr> |
KanchanChauhan | 32cbbe5 | 2017-05-19 15:14:31 +0530 | [diff] [blame] | 105 | <td class="text-muted" style="width: 30%;">{{ d.label }}</td> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 106 | <td>{{ d.description }}</td> |
| 107 | </tr> |
| 108 | {%- endfor %} |
| 109 | </table> |
| 110 | </div> |
| 111 | </div> |
| 112 | {%- endif %} |
| 113 | </div> |
| 114 | </div> |
| 115 | <script> |
| 116 | {% include "templates/includes/product_page.js" %} |
| 117 | |
Rushabh Mehta | 440650d | 2016-11-14 13:13:53 +0530 | [diff] [blame] | 118 | {% if variant_info %} |
| 119 | window.variant_info = {{ variant_info }}; |
| 120 | {% else %} |
| 121 | window.variant_info = null; |
| 122 | {% endif %} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 123 | </script> |
| 124 | {% endblock %} |