blob: 8a2dcf2af387e0fed08f4225ee305e01315c31fa [file] [log] [blame]
Rushabh Mehta51008f22016-01-01 17:23:12 +05301{% extends "templates/web.html" %}
2
Anand Doshi5d591eb2014-04-18 16:15:31 +05303{% block title %} {{ title }} {% endblock %}
4
5{% block header %}<h2>{{ title }}</h2>{% endblock %}
6
Rushabh Mehtaaded46d2015-06-01 17:23:42 +05307{% block header_actions %}
8{% include 'templates/includes/product_search_box.html' %}
9{% endblock %}
10
Rushabh Mehta51008f22016-01-01 17:23:12 +053011{% block page_content %}
Anand Doshida858cc2015-02-24 17:50:44 +053012{% from "erpnext/templates/includes/macros.html" import product_image %}
Anand Doshi5d591eb2014-04-18 16:15:31 +053013<div class="item-content">
Anand Doshi5d591eb2014-04-18 16:15:31 +053014 <div class="product-page-content" itemscope itemtype="http://schema.org/Product">
15 <div class="row">
Anand Doshida858cc2015-02-24 17:50:44 +053016 <div class="col-sm-5">
Anand Doshi5d591eb2014-04-18 16:15:31 +053017 {% if slideshow %}
18 {% include "templates/includes/slideshow.html" %}
19 {% else %}
Anand Doshida858cc2015-02-24 17:50:44 +053020 {{ product_image(website_image, "product-full-image") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053021 {% endif %}
22 </div>
Anand Doshida858cc2015-02-24 17:50:44 +053023 <div class="col-sm-7">
Rushabh Mehta3f517052014-04-21 22:10:15 +053024 <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> -->
Anand Doshi5d591eb2014-04-18 16:15:31 +053025 <div itemprop="description">
Rushabh Mehta3f517052014-04-21 22:10:15 +053026 {{ web_long_description or description or _("No description given") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053027 </div>
Rushabh Mehta3f517052014-04-21 22:10:15 +053028 <p class="text-muted">
Anand Doshi6d69ca62015-10-29 11:35:16 +053029 {{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
Rushabh Mehta3f517052014-04-21 22:10:15 +053030 <br>
Anand Doshi25ef4ff2015-10-20 18:34:21 +053031 <div class="item-attribute-selectors">
32 {% if has_variants %}
33 {% for d in attributes %}
Anand Doshi3f3696d2015-10-26 19:57:31 +053034 {% if attribute_values[d.attribute] -%}
35 <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
Anand Doshi25ef4ff2015-10-20 18:34:21 +053036 style="margin-bottom: 10px;">
37 <h6 class="text-muted">{{ _(d.attribute) }}</h6>
38 <select class="form-control"
39 style="max-width: 140px"
40 data-attribute="{{ d.attribute }}">
41 {% for value in attribute_values[d.attribute] %}
42 <option value="{{ value }}"
Anand Doshi3f3696d2015-10-26 19:57:31 +053043 {% if selected_attributes and selected_attributes[d.attribute]==value -%}
44 selected
45 {%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
46 disabled
47 {%- endif %}>
Anand Doshi25ef4ff2015-10-20 18:34:21 +053048 {{ _(value) }}
49 </option>
50 {% endfor %}
51 </select>
52 </div>
Anand Doshi3f3696d2015-10-26 19:57:31 +053053 {%- endif %}
Anand Doshi25ef4ff2015-10-20 18:34:21 +053054 {% endfor %}
55 {% endif %}
56 </div>
57 <br>
Anand Doshi5d591eb2014-04-18 16:15:31 +053058 <div style="min-height: 100px; margin: 10px 0;">
Rushabh Mehta156ce602015-09-11 18:49:59 +053059 <h4 class="item-price" itemprop="price"></h4>
60 <div class="item-stock" itemprop="availablity"></div>
61 <div class="item-cart hide">
62 <div id="item-add-to-cart">
63 <button class="btn btn-primary btn-sm">
64 {{ _("Add to Cart") }}</button>
65 </div>
66 <div id="item-update-cart"
67 style="display: none;
68 padding-left: 0px; padding-right: 0px;
69 padding-top: 10px;">
70 <div>
71 <input class="form-control"
72 type="text" style="max-width: 140px;">
73 </div>
74 <div style="margin-top: 10px;">
75 <button class="btn btn-default btn-sm">
76 {{ _("Update") }}</button>
77 </div>
78 <div style="margin-top: 5px;">
79 <a href="/cart" class="text-muted small">
80 {{ _("View Cart") }}</a>
81 </div>
82 </div>
83 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +053084 </div>
85 </div>
86 </div>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053087 {% if website_specifications -%}
88 <div class="row item-website-specification" style="margin-top: 20px">
Anand Doshi5d591eb2014-04-18 16:15:31 +053089 <div class="col-md-12">
Rushabh Mehta3f517052014-04-21 22:10:15 +053090 <h4>{{ _("Specifications") }}</h4>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053091
Anand Doshi5d591eb2014-04-18 16:15:31 +053092 <table class="table table-bordered" style="width: 100%">
Anand Doshi7c0eadb2015-10-20 17:30:02 +053093 {% for d in website_specifications -%}
Anand Doshi5d591eb2014-04-18 16:15:31 +053094 <tr>
95 <td style="width: 30%;">{{ d.label }}</td>
96 <td>{{ d.description }}</td>
97 </tr>
98 {%- endfor %}
99 </table>
100 </div>
101 </div>
102 {%- endif %}
103 </div>
104</div>
105<script>
106 {% include "templates/includes/product_page.js" %}
107
Rushabh Mehta80d2a552015-10-05 16:27:52 +0530108 {% if variant_info %}
109 window.variant_info = {{ variant_info }};
Rushabh Mehta6e322d02015-10-07 14:30:19 +0530110 {% else %}
111 window.variant_info = null;
Rushabh Mehta80d2a552015-10-05 16:27:52 +0530112 {% endif %}
Anand Doshi5d591eb2014-04-18 16:15:31 +0530113</script>
114{% endblock %}