blob: 500a11853eb553f0e3634db03e1255d94a3dd096 [file] [log] [blame]
Anand Doshi5d591eb2014-04-18 16:15:31 +05301{% block title %} {{ title }} {% endblock %}
2
3{% block header %}<h2>{{ title }}</h2>{% endblock %}
4
Rushabh Mehtaaded46d2015-06-01 17:23:42 +05305{% block header_actions %}
6{% include 'templates/includes/product_search_box.html' %}
7{% endblock %}
8
Anand Doshi5d591eb2014-04-18 16:15:31 +05309{% block content %}
Anand Doshida858cc2015-02-24 17:50:44 +053010{% from "erpnext/templates/includes/macros.html" import product_image %}
Anand Doshi5d591eb2014-04-18 16:15:31 +053011<div class="item-content">
Anand Doshi5d591eb2014-04-18 16:15:31 +053012 <div class="product-page-content" itemscope itemtype="http://schema.org/Product">
13 <div class="row">
Anand Doshida858cc2015-02-24 17:50:44 +053014 <div class="col-sm-5">
Anand Doshi5d591eb2014-04-18 16:15:31 +053015 {% if slideshow %}
16 {% include "templates/includes/slideshow.html" %}
17 {% else %}
Anand Doshida858cc2015-02-24 17:50:44 +053018 {{ product_image(website_image, "product-full-image") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053019 {% endif %}
20 </div>
Anand Doshida858cc2015-02-24 17:50:44 +053021 <div class="col-sm-7">
Rushabh Mehta3f517052014-04-21 22:10:15 +053022 <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> -->
Anand Doshi5d591eb2014-04-18 16:15:31 +053023 <div itemprop="description">
Rushabh Mehta3f517052014-04-21 22:10:15 +053024 {{ web_long_description or description or _("No description given") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053025 </div>
Rushabh Mehta3f517052014-04-21 22:10:15 +053026 <p class="text-muted">
Anand Doshi6d69ca62015-10-29 11:35:16 +053027 {{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
Rushabh Mehta3f517052014-04-21 22:10:15 +053028 <br>
Anand Doshi25ef4ff2015-10-20 18:34:21 +053029 <div class="item-attribute-selectors">
30 {% if has_variants %}
31 {% for d in attributes %}
Anand Doshi3f3696d2015-10-26 19:57:31 +053032 {% if attribute_values[d.attribute] -%}
33 <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
Anand Doshi25ef4ff2015-10-20 18:34:21 +053034 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 Doshi3f3696d2015-10-26 19:57:31 +053041 {% 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 Doshi25ef4ff2015-10-20 18:34:21 +053046 {{ _(value) }}
47 </option>
48 {% endfor %}
49 </select>
50 </div>
Anand Doshi3f3696d2015-10-26 19:57:31 +053051 {%- endif %}
Anand Doshi25ef4ff2015-10-20 18:34:21 +053052 {% endfor %}
53 {% endif %}
54 </div>
55 <br>
Anand Doshi5d591eb2014-04-18 16:15:31 +053056 <div style="min-height: 100px; margin: 10px 0;">
Rushabh Mehta156ce602015-09-11 18:49:59 +053057 <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 Doshi5d591eb2014-04-18 16:15:31 +053082 </div>
83 </div>
84 </div>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053085 {% if website_specifications -%}
86 <div class="row item-website-specification" style="margin-top: 20px">
Anand Doshi5d591eb2014-04-18 16:15:31 +053087 <div class="col-md-12">
Rushabh Mehta3f517052014-04-21 22:10:15 +053088 <h4>{{ _("Specifications") }}</h4>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053089
Anand Doshi5d591eb2014-04-18 16:15:31 +053090 <table class="table table-bordered" style="width: 100%">
Anand Doshi7c0eadb2015-10-20 17:30:02 +053091 {% for d in website_specifications -%}
Anand Doshi5d591eb2014-04-18 16:15:31 +053092 <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 Mehta80d2a552015-10-05 16:27:52 +0530106 {% if variant_info %}
107 window.variant_info = {{ variant_info }};
Rushabh Mehta6e322d02015-10-07 14:30:19 +0530108 {% else %}
109 window.variant_info = null;
Rushabh Mehta80d2a552015-10-05 16:27:52 +0530110 {% endif %}
Anand Doshi5d591eb2014-04-18 16:15:31 +0530111</script>
112{% endblock %}