added item specification, bugfix for form grid
diff --git a/website/templates/css/product_page.css b/website/templates/css/product_page.css
index 2708625..bf893ca 100644
--- a/website/templates/css/product_page.css
+++ b/website/templates/css/product_page.css
@@ -1,34 +1,9 @@
<style>
+ .item-main-image {
+ max-width: 60%;
+ }
.web-long-description {
font-size: 18px;
line-height: 200%;
}
- .product-page-content {
- float: left;
- }
- /* product page image css */
- .product-page-content img {
- max-width: 100%;
- }
-
- /* similar products listing */
- .similar-products .img-area img {
- max-width: 55px;
- max-height: 55px;
- }
-
- .similar-products .img-area {
- float: left;
- width: 30%;
- margin-top: 0.3em;
- }
-
- .similar-product-description {
- float: left;
- width: 70%;
- }
-
- .similar-product-description span {
- font-size: 12px;
- }
</style>
\ No newline at end of file
diff --git a/website/templates/html/product_page.html b/website/templates/html/product_page.html
index 646bba9..709c3ea 100644
--- a/website/templates/html/product_page.html
+++ b/website/templates/html/product_page.html
@@ -19,30 +19,36 @@
{% block content %}
<div class="layout-wrapper layout-wrapper-background">
<div class="web-content" id="content-product-{{ name }}">
- <div class="layout-main-section">
+ <div class="layout-main" style="padding: 30px;">
<h1>{{ item_name }}</h1>
<div class="product-page-content">
<br><br>
{% if website_image %}
- <image src="files/{{ website_image }}" />
+ <image class="item-main-image" src="files/{{ website_image }}" />
{% else %}
<div class="img-area"></div>
<span style="font-size: 11px">This is an auto-generated Image</span>
{% endif %}
<br><br>
- <div class="web-long-description">
- {{ web_description_html }}
+ <h3>Product Description</h3>
+ <div>
+ {{ web_long_description or web_short_description }}
</div>
+ <hr>
+ {% if obj.doclist.get({"doctype":"Item Website Specification"}) %}
+ <h3>Specifications</h3>
+ <table class="table table-striped table-bordered" style="width: 80%">
+ {% for d in obj.doclist.get(
+ {"doctype":"Item Website Specification"}) %}
+ <tr>
+ <td>{{ d.label }}</td>
+ <td>{{ d.description }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ {% endif %}
</div>
</div>
- <div class="layout-side-section">
- <h4>More Categories</h4>
- <div class="more-categories"></div>
- <br>
- <h4>Similar Products</h4>
- <div class="similar-products"></div>
- </div>
- <div style="clear: both"></div>
</div>
</div>
{% endblock %}
\ No newline at end of file
diff --git a/website/utils.py b/website/utils.py
index 0fc5f98..198746f 100644
--- a/website/utils.py
+++ b/website/utils.py
@@ -156,13 +156,14 @@
def get_doc_fields(page_name):
doc_type, doc_name = get_source_doc(page_name)
- obj = webnotes.get_obj(doc_type, doc_name)
+ obj = webnotes.get_obj(doc_type, doc_name, with_children=True)
if hasattr(obj, 'prepare_template_args'):
obj.prepare_template_args()
args = obj.doc.fields
args['template'] = page_map[doc_type].template
+ args['obj'] = obj
return args