blob: 34d345fd2f1285c48adb0784a1ee099cb94198d4 [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
Anand Doshi13bf1232016-01-04 17:50:40 +053011{% block breadcrumbs %}
12 {% include "templates/includes/breadcrumbs.html" %}
13{% endblock %}
14
Rushabh Mehta51008f22016-01-01 17:23:12 +053015{% block page_content %}
Anand Doshida858cc2015-02-24 17:50:44 +053016{% from "erpnext/templates/includes/macros.html" import product_image %}
Anand Doshi5d591eb2014-04-18 16:15:31 +053017<div class="item-content">
Anand Doshi5d591eb2014-04-18 16:15:31 +053018 <div class="product-page-content" itemscope itemtype="http://schema.org/Product">
19 <div class="row">
Anand Doshida858cc2015-02-24 17:50:44 +053020 <div class="col-sm-5">
Anand Doshi5d591eb2014-04-18 16:15:31 +053021 {% if slideshow %}
22 {% include "templates/includes/slideshow.html" %}
23 {% else %}
Anand Doshida858cc2015-02-24 17:50:44 +053024 {{ product_image(website_image, "product-full-image") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053025 {% endif %}
26 </div>
Anand Doshida858cc2015-02-24 17:50:44 +053027 <div class="col-sm-7">
Rushabh Mehta3f517052014-04-21 22:10:15 +053028 <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> -->
Anand Doshi5d591eb2014-04-18 16:15:31 +053029 <div itemprop="description">
Rushabh Mehta3f517052014-04-21 22:10:15 +053030 {{ web_long_description or description or _("No description given") }}
Anand Doshi5d591eb2014-04-18 16:15:31 +053031 </div>
Rushabh Mehta3f517052014-04-21 22:10:15 +053032 <p class="text-muted">
Anand Doshi6d69ca62015-10-29 11:35:16 +053033 {{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
Rushabh Mehta3f517052014-04-21 22:10:15 +053034 <br>
Anand Doshi25ef4ff2015-10-20 18:34:21 +053035 <div class="item-attribute-selectors">
36 {% if has_variants %}
37 {% for d in attributes %}
Anand Doshi3f3696d2015-10-26 19:57:31 +053038 {% if attribute_values[d.attribute] -%}
39 <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
Anand Doshi25ef4ff2015-10-20 18:34:21 +053040 style="margin-bottom: 10px;">
41 <h6 class="text-muted">{{ _(d.attribute) }}</h6>
42 <select class="form-control"
43 style="max-width: 140px"
44 data-attribute="{{ d.attribute }}">
45 {% for value in attribute_values[d.attribute] %}
46 <option value="{{ value }}"
Anand Doshi3f3696d2015-10-26 19:57:31 +053047 {% if selected_attributes and selected_attributes[d.attribute]==value -%}
48 selected
49 {%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
50 disabled
51 {%- endif %}>
Anand Doshi25ef4ff2015-10-20 18:34:21 +053052 {{ _(value) }}
53 </option>
54 {% endfor %}
55 </select>
56 </div>
Anand Doshi3f3696d2015-10-26 19:57:31 +053057 {%- endif %}
Anand Doshi25ef4ff2015-10-20 18:34:21 +053058 {% endfor %}
59 {% endif %}
60 </div>
61 <br>
Anand Doshi5d591eb2014-04-18 16:15:31 +053062 <div style="min-height: 100px; margin: 10px 0;">
Rushabh Mehta156ce602015-09-11 18:49:59 +053063 <h4 class="item-price" itemprop="price"></h4>
64 <div class="item-stock" itemprop="availablity"></div>
65 <div class="item-cart hide">
66 <div id="item-add-to-cart">
67 <button class="btn btn-primary btn-sm">
68 {{ _("Add to Cart") }}</button>
69 </div>
70 <div id="item-update-cart"
71 style="display: none;
72 padding-left: 0px; padding-right: 0px;
73 padding-top: 10px;">
Saurabh69f99752016-01-06 16:41:50 +053074 <a href="/cart">{{ _("Goto Cart") }}</a>
Rushabh Mehta156ce602015-09-11 18:49:59 +053075 </div>
76 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +053077 </div>
78 </div>
79 </div>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053080 {% if website_specifications -%}
81 <div class="row item-website-specification" style="margin-top: 20px">
Anand Doshi5d591eb2014-04-18 16:15:31 +053082 <div class="col-md-12">
Rushabh Mehta3f517052014-04-21 22:10:15 +053083 <h4>{{ _("Specifications") }}</h4>
Anand Doshi7c0eadb2015-10-20 17:30:02 +053084
Anand Doshi5d591eb2014-04-18 16:15:31 +053085 <table class="table table-bordered" style="width: 100%">
Anand Doshi7c0eadb2015-10-20 17:30:02 +053086 {% for d in website_specifications -%}
Anand Doshi5d591eb2014-04-18 16:15:31 +053087 <tr>
88 <td style="width: 30%;">{{ d.label }}</td>
89 <td>{{ d.description }}</td>
90 </tr>
91 {%- endfor %}
92 </table>
93 </div>
94 </div>
95 {%- endif %}
96 </div>
97</div>
98<script>
99 {% include "templates/includes/product_page.js" %}
100
Rushabh Mehta80d2a552015-10-05 16:27:52 +0530101 {% if variant_info %}
102 window.variant_info = {{ variant_info }};
Rushabh Mehta6e322d02015-10-07 14:30:19 +0530103 {% else %}
104 window.variant_info = null;
Rushabh Mehta80d2a552015-10-05 16:27:52 +0530105 {% endif %}
Anand Doshi5d591eb2014-04-18 16:15:31 +0530106</script>
107{% endblock %}