Added product snippet for test and added the data-snippet-id in product of resizing...
authorParamjit Singh Sahota <psa@tinyerp.com>
Fri, 20 Sep 2013 07:06:43 +0000 (12:36 +0530)
committerParamjit Singh Sahota <psa@tinyerp.com>
Fri, 20 Sep 2013 07:06:43 +0000 (12:36 +0530)
bzr revid: psa@tinyerp.com-20130920070643-cmdq57j04hgx764c

addons/website/static/src/xml/website.snippets.xml
addons/website_sale/views/website_sale.xml

index 87bf039..18c39e1 100644 (file)
         </section>
     </div>
 
+    <div t-name="website.snippets.product" data-snippet-id='product' data-category='business' data-selector-children='.oe_structure, [data-oe-type=html]'>
+        <div class='oe_snippet_label'>Product</div>
+        <div class='oe_snippet_thumbnail'>Product</div>
+        <section class="oe_snippet_body">
+            <div class="container">
+                <div class="row">
+                    <div class="col-md-3 oe_product text-center">
+                            <div class="oe_product_name">
+                                <a>
+                                    <h5>Product Name</h5>
+                                </a>
+                                <small>This is the product description.</small><br/>
+                            </div>
+                            <img class="img-thumbnail img-responsive mb16" src="/website/static/src/img/landscape.jpg"/>
+                            <div class="oe_product_price">
+                                <b>100 €</b><br/>
+                                <a href="/page/website.contactus" class="btn btn-default btn-sm btn-success">Add to basket</a>
+                            </div>
+                        </div>
+                </div>
+            </div>
+        </section>
+    </div>
 
     <div t-name="website.snippets.references" data-snippet-id='references' data-category='business' data-selector-children='.oe_structure, [data-oe-type=html]'>
         <div class='oe_snippet_label'>References</div>
index 1bd930a..e815a9a 100644 (file)
 
                 <div class='row'>
                     <t t-foreach="products" t-as="product">
-                        <div t-attf-class="col-md-#{ product.website_sizex } oe_product text-center oe-height-#{ product.website_sizey }" t-att-data-publish="product.website_published">
+                        <div t-attf-class="col-md-#{ product.website_sizex } oe_product text-center oe-height-#{ product.website_sizey }" t-att-data-publish="product.website_published" data-snippet-id="colmd">
 
                             <div class="oe_product_name">
                                 <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}" style="text-decoration: none; display: block;">