blob: af4a795c9f3022221b3e188e3fc3b86a7d7b2153 [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">
27 {{ _("Item Code") }}: <span itemprop="productID">{{ name }}</span></p>
28 <br>
Anand Doshi5d591eb2014-04-18 16:15:31 +053029 <div style="min-height: 100px; margin: 10px 0;">
Rushabh Mehta156ce602015-09-11 18:49:59 +053030 <h4 class="item-price" itemprop="price"></h4>
31 <div class="item-stock" itemprop="availablity"></div>
32 <div class="item-cart hide">
33 <div id="item-add-to-cart">
34 <button class="btn btn-primary btn-sm">
35 {{ _("Add to Cart") }}</button>
36 </div>
37 <div id="item-update-cart"
38 style="display: none;
39 padding-left: 0px; padding-right: 0px;
40 padding-top: 10px;">
41 <div>
42 <input class="form-control"
43 type="text" style="max-width: 140px;">
44 </div>
45 <div style="margin-top: 10px;">
46 <button class="btn btn-default btn-sm">
47 {{ _("Update") }}</button>
48 </div>
49 <div style="margin-top: 5px;">
50 <a href="/cart" class="text-muted small">
51 {{ _("View Cart") }}</a>
52 </div>
53 </div>
54 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +053055 </div>
56 </div>
57 </div>
58 {% if doc.get({"doctype":"Item Website Specification"}) -%}
59 <div class="row" style="margin-top: 20px">
60 <div class="col-md-12">
Rushabh Mehta3f517052014-04-21 22:10:15 +053061 <h4>{{ _("Specifications") }}</h4>
Anand Doshi5d591eb2014-04-18 16:15:31 +053062 <table class="table table-bordered" style="width: 100%">
63 {% for d in doc.get(
64 {"doctype":"Item Website Specification"}) -%}
65 <tr>
66 <td style="width: 30%;">{{ d.label }}</td>
67 <td>{{ d.description }}</td>
68 </tr>
69 {%- endfor %}
70 </table>
71 </div>
72 </div>
73 {%- endif %}
74 </div>
75</div>
76<script>
77 {% include "templates/includes/product_page.js" %}
78
79 $(function() {
80 if(window.logged_in && getCookie("system_user")==="yes") {
81 frappe.has_permission("Item", "{{ name }}", "write", function(r) {
82 frappe.require("/assets/frappe/js/frappe/website/editable.js");
83 frappe.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
84 });
85 }
86 });
87</script>
88{% endblock %}