blob: 322072213d9f8a83a4819633ddc4f19317e81722 [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
Anand Doshi13bf1232016-01-04 17:50:40 +05305{% block breadcrumbs %}
Rushabh Mehta440650d2016-11-14 13:13:53 +05306 {% include "templates/includes/breadcrumbs.html" %}
Anand Doshi13bf1232016-01-04 17:50:40 +05307{% endblock %}
8
Rushabh Mehta51008f22016-01-01 17:23:12 +05309{% block page_content %}
Anand Doshida858cc2015-02-24 17:50:44 +053010{% from "erpnext/templates/includes/macros.html" import product_image %}
Solufyin3be899c2018-08-07 18:28:39 +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">
Solufyin3be899c2018-08-07 18:28:39 +053014 <div class="row">
Anand Doshi5d591eb2014-04-18 16:15:31 +053015 {% if slideshow %}
Solufyin3be899c2018-08-07 18:28:39 +053016 {% set slideshow_items = frappe.get_list(doctype="Website Slideshow Item", fields=["image"], filters={ "parent": doc.slideshow }) %}
17 <div class="col-md-1">
18 {%- for slideshow_item in slideshow_items -%}
19 {% set image_src = slideshow_item['image'] %}
20 {% if image_src %}
21 <div class="item-alternative-image border">
22 <img src="{{ image_src }}" height="50" weight="50" />
Rushabh Mehta440650d2016-11-14 13:13:53 +053023 </div>
Rushabh Mehta440650d2016-11-14 13:13:53 +053024 {% endif %}
Solufyin3be899c2018-08-07 18:28:39 +053025 {% endfor %}
Anand Doshi25ef4ff2015-10-20 18:34:21 +053026 </div>
Solufyin3be899c2018-08-07 18:28:39 +053027 <div class="col-md-5">
28 <div class="item-image">
29 {% set first_image = slideshow_items[0]['image'] %}
30 {{ product_image(first_image, "product-full-image") }}
Rushabh Mehta4b9238a2016-05-12 15:22:59 +053031 </div>
Solufyin3be899c2018-08-07 18:28:39 +053032 </div>
33 {% else %}
34 <div class="col-md-6">
35 {{ product_image(website_image, "product-full-image") }}
36 </div>
37 {% endif %}
38 <div class="col-sm-6">
39 <h2 itemprop="name">{{ item_name }}</h2>
40 <p class="text-muted">
41 {{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span>
42 </p>
43 <br>
44 <div class="item-attribute-selectors">
45 {% if has_variants and attributes %}
46 {{ attributes }}
47 {#
48
49 {% for d in attributes %}
50 {% if attribute_values[d.attribute] -%}
51 <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
52 style="margin-bottom: 10px;">
53 <h6 class="text-muted">{{ _(d.attribute) }}</h6>
54 <select class="form-control"
55 style="max-width: 140px"
56 data-attribute="{{ d.attribute }}">
57 {% for value in attribute_values[d.attribute] %}
58 <option value="{{ value }}"
59 {% if selected_attributes and selected_attributes[d.attribute]==value -%}
60 selected
61 {%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
62 disabled
63 {%- endif %}>
64 {{ _(value) }}
65 </option>
66 {% endfor %}
67 </select>
68 </div>
69 {%- endif %}
70 {% endfor %}
71
72 #}
73 {% endif %}
74 </div>
75 <br>
76 <div>
77 <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
78 <h4 class="item-price hide" itemprop="price"></h4>
79 <div class="item-stock hide" itemprop="availability"></div>
80 </div>
81 <div class="item-cart hide">
82 <div id="item-spinner">
83 <span style="display: inline-block">
84 <div class="input-group number-spinner">
85 <span class="input-group-btn">
86 <button class="btn btn-default cart-btn" data-dir="dwn">
87</button>
88 </span>
89 <input class="form-control text-right cart-qty" value="1">
90 <span class="input-group-btn">
91 <button class="btn btn-default cart-btn" data-dir="up" style="margin-left:-2px;">
britlogd13985d2018-01-19 18:31:25 +010092 +</button>
Solufyin3be899c2018-08-07 18:28:39 +053093 </span>
94 </div>
95 </span>
96 </div>
97 <div id="item-add-to-cart">
98 <button class="btn btn-primary btn-sm">
99 {{ _("Add to Cart") }}</button>
100 </div>
101 <div id="item-update-cart" style="display: none;">
102 <a href="/cart" class='btn btn-sm btn-default'>
103 <i class='octicon octicon-check'></i>
104 {{ _("View in Cart") }}</a>
105 </div>
Rushabh Mehta440650d2016-11-14 13:13:53 +0530106 </div>
107 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +0530108 </div>
109 </div>
Solufyin3be899c2018-08-07 18:28:39 +0530110 <div class="row item-website-description margin-top">
111 <div class="col-md-12">
112 <div class="h6 text-uppercase">{{ _("Description") }}</div>
113 <div itemprop="description" class="item-desc">
114 {{ web_long_description or description or _("No description given") }}
115 </div>
116 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +0530117 </div>
Solufyin3be899c2018-08-07 18:28:39 +0530118 {% if website_specifications -%}
119 <div class="row item-website-specification margin-top">
120 <div class="col-md-12">
121 <div class="h6 text-uppercase">{{ _("Specifications") }}</div>
122
123 <table class="table">
124 {% for d in website_specifications -%}
125 <tr>
126 <td class="text-muted" style="width: 30%;">{{ d.label }}</td>
127 <td>{{ d.description }}</td>
128 </tr>
129 {%- endfor %}
130 </table>
131 </div>
132 </div>
133 {%- endif %}
Anand Doshi5d591eb2014-04-18 16:15:31 +0530134 </div>
Anand Doshi5d591eb2014-04-18 16:15:31 +0530135 </div>
136</div>
137<script>
138 {% include "templates/includes/product_page.js" %}
139
Rushabh Mehta440650d2016-11-14 13:13:53 +0530140 {% if variant_info %}
141 window.variant_info = {{ variant_info }};
142 {% else %}
143 window.variant_info = null;
144 {% endif %}
Anand Doshi5d591eb2014-04-18 16:15:31 +0530145</script>
146{% endblock %}