2016-01-01 11:53:12 +00:00
|
|
|
|
{% extends "templates/web.html" %}
|
|
|
|
|
|
2014-04-18 10:45:31 +00:00
|
|
|
|
{% block title %} {{ title }} {% endblock %}
|
|
|
|
|
|
2016-01-04 12:20:40 +00:00
|
|
|
|
{% block breadcrumbs %}
|
2016-11-14 07:43:53 +00:00
|
|
|
|
{% include "templates/includes/breadcrumbs.html" %}
|
2016-01-04 12:20:40 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2016-01-01 11:53:12 +00:00
|
|
|
|
{% block page_content %}
|
2015-02-24 12:20:44 +00:00
|
|
|
|
{% from "erpnext/templates/includes/macros.html" import product_image %}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="item-content">
|
2014-04-18 10:45:31 +00:00
|
|
|
|
<div class="product-page-content" itemscope itemtype="http://schema.org/Product">
|
|
|
|
|
<div class="row">
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="row">
|
2014-04-18 10:45:31 +00:00
|
|
|
|
{% if slideshow %}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
{% set slideshow_items = frappe.get_list(doctype="Website Slideshow Item", fields=["image"], filters={ "parent": doc.slideshow }) %}
|
|
|
|
|
<div class="col-md-1">
|
|
|
|
|
{%- for slideshow_item in slideshow_items -%}
|
|
|
|
|
{% set image_src = slideshow_item['image'] %}
|
|
|
|
|
{% if image_src %}
|
|
|
|
|
<div class="item-alternative-image border">
|
|
|
|
|
<img src="{{ image_src }}" height="50" weight="50" />
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<div class="item-image">
|
|
|
|
|
{% set first_image = slideshow_items[0]['image'] %}
|
|
|
|
|
{{ product_image(first_image, "product-full-image") }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-04-18 10:45:31 +00:00
|
|
|
|
{% else %}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="col-md-6">
|
2015-02-24 12:20:44 +00:00
|
|
|
|
{{ product_image(website_image, "product-full-image") }}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
</div>
|
2014-04-18 10:45:31 +00:00
|
|
|
|
{% endif %}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<h2 itemprop="name">{{ item_name }}</h2>
|
|
|
|
|
<p class="text-muted">
|
|
|
|
|
{{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<br>
|
|
|
|
|
<div class="item-attribute-selectors">
|
|
|
|
|
{% if has_variants and attributes %}
|
2016-05-12 09:52:59 +00:00
|
|
|
|
|
2018-08-07 12:58:39 +00:00
|
|
|
|
{% for d in attributes %}
|
|
|
|
|
{% if attribute_values[d.attribute] -%}
|
|
|
|
|
<div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
|
|
|
|
|
style="margin-bottom: 10px;">
|
|
|
|
|
<h6 class="text-muted">{{ _(d.attribute) }}</h6>
|
|
|
|
|
<select class="form-control"
|
|
|
|
|
style="max-width: 140px"
|
|
|
|
|
data-attribute="{{ d.attribute }}">
|
|
|
|
|
{% for value in attribute_values[d.attribute] %}
|
|
|
|
|
<option value="{{ value }}"
|
|
|
|
|
{% if selected_attributes and selected_attributes[d.attribute]==value -%}
|
|
|
|
|
selected
|
|
|
|
|
{%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
|
|
|
|
|
disabled
|
|
|
|
|
{%- endif %}>
|
|
|
|
|
{{ _(value) }}
|
|
|
|
|
</option>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
{%- endif %}
|
2016-11-14 07:43:53 +00:00
|
|
|
|
{% endfor %}
|
2018-08-07 12:58:39 +00:00
|
|
|
|
|
|
|
|
|
{% endif %}
|
2016-05-12 09:52:59 +00:00
|
|
|
|
</div>
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<br>
|
|
|
|
|
<div>
|
|
|
|
|
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
|
|
|
<h4 class="item-price hide" itemprop="price"></h4>
|
|
|
|
|
<div class="item-stock hide" itemprop="availability"></div>
|
2016-11-14 07:43:53 +00:00
|
|
|
|
</div>
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="item-cart hide">
|
|
|
|
|
<div id="item-spinner">
|
|
|
|
|
<span style="display: inline-block">
|
|
|
|
|
<div class="input-group number-spinner">
|
|
|
|
|
<span class="input-group-btn">
|
|
|
|
|
<button class="btn btn-default cart-btn" data-dir="dwn">
|
|
|
|
|
–</button>
|
|
|
|
|
</span>
|
|
|
|
|
<input class="form-control text-right cart-qty" value="1">
|
|
|
|
|
<span class="input-group-btn">
|
|
|
|
|
<button class="btn btn-default cart-btn" data-dir="up" style="margin-left:-2px;">
|
|
|
|
|
+</button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="item-add-to-cart">
|
|
|
|
|
<button class="btn btn-primary btn-sm">
|
|
|
|
|
{{ _("Add to Cart") }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="item-update-cart" style="display: none;">
|
|
|
|
|
<a href="/cart" class='btn btn-sm btn-default'>
|
|
|
|
|
<i class='octicon octicon-check'></i>
|
|
|
|
|
{{ _("View in Cart") }}</a>
|
|
|
|
|
</div>
|
2016-11-14 07:43:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-04-18 10:45:31 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<div class="row item-website-description margin-top">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="h6 text-uppercase">{{ _("Description") }}</div>
|
|
|
|
|
<div itemprop="description" class="item-desc">
|
|
|
|
|
{{ web_long_description or description or _("No description given") }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% if website_specifications -%}
|
|
|
|
|
<div class="row item-website-specification margin-top">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="h6 text-uppercase">{{ _("Specifications") }}</div>
|
2015-10-20 12:00:02 +00:00
|
|
|
|
|
2018-08-07 12:58:39 +00:00
|
|
|
|
<table class="table">
|
|
|
|
|
{% for d in website_specifications -%}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="text-muted" style="width: 30%;">{{ d.label }}</td>
|
|
|
|
|
<td>{{ d.description }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{%- endfor %}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2014-04-18 10:45:31 +00:00
|
|
|
|
</div>
|
2018-08-07 12:58:39 +00:00
|
|
|
|
{%- endif %}
|
2014-04-18 10:45:31 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
{% include "templates/includes/product_page.js" %}
|
|
|
|
|
|
2016-11-14 07:43:53 +00:00
|
|
|
|
{% if variant_info %}
|
|
|
|
|
window.variant_info = {{ variant_info }};
|
|
|
|
|
{% else %}
|
|
|
|
|
window.variant_info = null;
|
|
|
|
|
{% endif %}
|
2014-04-18 10:45:31 +00:00
|
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|