Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 1 | {% block title %} {{ title }} {% endblock %} |
| 2 | |
| 3 | {% block header %}<h2>{{ title }}</h2>{% endblock %} |
| 4 | |
Rushabh Mehta | aded46d | 2015-06-01 17:23:42 +0530 | [diff] [blame] | 5 | {% block header_actions %} |
| 6 | {% include 'templates/includes/product_search_box.html' %} |
| 7 | {% endblock %} |
| 8 | |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 9 | {% block content %} |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 10 | {% from "erpnext/templates/includes/macros.html" import product_image %} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 11 | <div class="item-content"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 12 | <div class="product-page-content" itemscope itemtype="http://schema.org/Product"> |
| 13 | <div class="row"> |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 14 | <div class="col-sm-5"> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 15 | {% if slideshow %} |
| 16 | {% include "templates/includes/slideshow.html" %} |
| 17 | {% else %} |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 18 | {{ product_image(website_image, "product-full-image") }} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 19 | {% endif %} |
| 20 | </div> |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 21 | <div class="col-sm-7"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 22 | <!-- <h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3> --> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 23 | <div itemprop="description"> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 24 | {{ web_long_description or description or _("No description given") }} |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 25 | </div> |
Rushabh Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 26 | <p class="text-muted"> |
| 27 | {{ _("Item Code") }}: <span itemprop="productID">{{ name }}</span></p> |
| 28 | <br> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 29 | <div style="min-height: 100px; margin: 10px 0;"> |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 30 | <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 Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 55 | </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 Mehta | 3f51705 | 2014-04-21 22:10:15 +0530 | [diff] [blame] | 61 | <h4>{{ _("Specifications") }}</h4> |
Anand Doshi | 5d591eb | 2014-04-18 16:15:31 +0530 | [diff] [blame] | 62 | <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 %} |