[FIX] website_sale: click on blank cd, add to cart -> I have a webcam instead
[odoo/odoo.git] / addons / website_sale / views / website_sale.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5     <!-- Layout add nav and footer -->
6
7     <template id="header" inherit_id="website.layout" name="Header Shop My Cart Link">
8         <xpath expr="//header//ul[@id='top_menu']/li" position="before">
9             <li t-att-class="(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''">
10                 <a href="/shop/mycart/">
11                     <i class="icon-shopping-cart"></i>
12                     My cart <sup t-attf-class="my_cart_quantity label label-primary"
13                                   t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
14                 </a>
15             </li>
16         </xpath>
17         <xpath expr="//head" position="inside">
18             <t t-if="editable">
19                 <script type="text/javascript" src="/website_sale/static/src/js/website.tour.shop.js"></script>
20             </t>
21         </xpath>
22     </template>
23
24     <!-- List of categories -->
25
26     <template id="categories_recursive" name="Category list">
27         <li t-att-class="str(category.id) == search.get('category') and 'active' or ''">
28             <a t-att-class="category.id not in categ[1] and 'unpublish' or ''" t-href="/shop/?category=#{ category.id }" t-field="category.name" t-keep-query="search,facettes"></a>
29             <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
30                 <t t-foreach="category.child_id" t-as="category">
31                     <t t-if="category.id in categ[1] or editable">
32                         <t t-call="website_sale.categories_recursive"/>
33                     </t>
34                 </t>
35             </ul>
36         </li>
37     </template>
38
39     <!-- Product list -->
40
41     <template id="search" name="Search hidden fields">
42         <input type="hidden" name="category" t-att-value="search.get('category') or ''"/>
43         <input type="hidden" name="filter" t-att-value="search.get('filter') or ''"/>
44         <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search.get('search') or ''"/>
45     </template>
46
47     <template id="products_cart" name="Shopping cart">
48       <div class="ribbon-wrapper" contentEditable="false">
49         <div class="ribbon"><span contentEditable="true">Promo</span></div>
50       </div>
51       <div class="oe_product_description">
52           <a t-href="/shop/product/#{ product.id }/" t-keep-query="category,search,facettes">
53               <b t-field="product.name"/>
54           </a>
55       </div>
56       <div class="product_price" t-if="product.product_variant_ids">
57           <b>
58               <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
59                 <del class="text-danger"
60                   t-field="product.product_variant_ids[0].lst_price" t-field-options='{
61                        "widget": "monetary",
62                        "display_currency": "website.pricelist_id.currency_id"
63                   }'/>&amp;nbsp;
64               </t>
65               <span t-field="product.product_variant_ids[0].price"  t-field-options='{
66                    "widget": "monetary",
67                    "display_currency": "website.pricelist_id.currency_id"
68                }'/>
69           </b>
70       </div>
71       <div class="oe_product_image text-center">
72           <a t-href="/shop/product/#{ product.id }/" t-keep-query="category,search,facettes">
73               <span t-field="product.image" t-field-options='{"widget": "image"}'/>
74           </a>
75       </div>
76     </template>
77
78     <template id="products" name="Products">
79         <t t-call="website.layout">
80             <t t-set="head">
81                 <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
82                 <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
83                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
84                 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
85                 <t t-raw="head or ''"/>
86             </t>
87             <t t-set="additional_title">Shop</t>
88             <div id="wrap">
89               <div class="oe_structure"/>
90               <div class="container oe_website_sale">
91                 <div class="row">
92                     <div class="col-sm-4 pagination hidden-xs" style="padding-left: 15px;">
93                         <form t-if="editable" t-keep-query="category,search,facettes"
94                               method="POST" t-action="/shop/add_product">
95                             <button class="btn btn-primary">New Product</button>
96                         </form>
97                     </div>
98                     <div class="col-sm-8 products_pager">
99                         <t t-call="website.pager">
100                             <t t-set="classname">pull-right</t>
101                             <t t-set="style">padding-left: 5px;</t>
102                         </t>
103                         <form action="/shop/" method="get" class="pull-right pagination form-inline" style="padding-right: 5px;">
104                             <t t-call="website_sale.search" />
105                         </form>
106                     </div>
107                 </div>
108
109                 <div class='style_default row'>
110                   <div class="hidden" id="products_grid_before"></div>
111                   <div class="col-md-12" id="products_grid">
112                     <t t-if="product_ids">
113                     <table width="100%">
114                       <tbody>
115                         <t t-set="table_products" t-value="Ecommerce.get_bin_packing_products(product_ids, product_ids_for_holes, 4)"/>
116                         <tr t-foreach="table_products" t-as="tr_product">
117                           <t t-foreach="tr_product" t-as="td_product">
118                             <t t-if="td_product">
119                             <t t-set="product" t-value="td_product['product']"/>
120                             <td t-att-colspan="td_product['x']"
121                                 t-attf-width="#{td_product['x']*25}%"
122                                 t-att-rowspan="td_product['y']"
123                                 t-attf-class="oe_product oe-height-#{td_product['y']*2} #{ td_product['class'] }">
124
125                                 <div class="oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
126
127                                   <div class="css_options" t-ignore="true" t-if="has_access_write">
128                                     <div t-attf-class="dropdown js_options" t-att-data-id="product.id">
129                                       <a class="btn btn-default" t-att-id="'dopprod-%s' % product.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></a>
130                                       <ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % product.id">
131                                         <li class='dropdown-submenu'>
132                                           <a tabindex="-1" href="#">Size</a>
133                                           <ul class="dropdown-menu" name="size">
134                                             <li><a href="#">
135                                               <table>
136                                                 <tr>
137                                                   <td class="selected"></td>
138                                                   <td t-att-class="product.website_size_x > 1 and 'selected'"></td>
139                                                   <td t-att-class="product.website_size_x > 2 and 'selected'"></td>
140                                                   <td t-att-class="product.website_size_x > 3 and 'selected'"></td>
141                                                 </tr>
142                                                 <tr>
143                                                   <td t-att-class="product.website_size_y > 1 and 'selected'"></td>
144                                                   <td t-att-class="product.website_size_y > 1 and product.website_size_x > 1 and 'selected'"></td>
145                                                   <td t-att-class="product.website_size_y > 1 and product.website_size_x > 2 and 'selected'"></td>
146                                                   <td t-att-class="product.website_size_y > 1 and product.website_size_x > 3 and 'selected'"></td>
147                                                 </tr>
148                                                 <tr>
149                                                   <td t-att-class="product.website_size_y > 2 and 'selected'"></td>
150                                                   <td t-att-class="product.website_size_y > 2 and product.website_size_x > 1 and 'selected'"></td>
151                                                   <td t-att-class="product.website_size_y > 2 and product.website_size_x > 2 and 'selected'"></td>
152                                                   <td t-att-class="product.website_size_y > 2 and product.website_size_x > 3 and 'selected'"></td>
153                                                 </tr>
154                                                 <tr>
155                                                   <td t-att-class="product.website_size_y > 3 and 'selected'"></td>
156                                                   <td t-att-class="product.website_size_y > 3 and product.website_size_x > 1 and 'selected'"></td>
157                                                   <td t-att-class="product.website_size_y > 3 and product.website_size_x > 2 and 'selected'"></td>
158                                                   <td t-att-class="product.website_size_y > 3 and product.website_size_x > 3 and 'selected'"></td>
159                                                 </tr>
160                                               </table>
161                                             </a></li>
162                                           </ul>
163                                         </li>
164                                         <li class='dropdown-submenu'>
165                                           <a tabindex="-1" href="#">Styles</a>
166                                           <ul class="dropdown-menu" name="style">
167                                             <t t-foreach="styles" t-as="style">
168                                               <li t-att-class="style_in_product(style, product) and 'active' or ''"><a href="#" t-att-data-id="style.id" t-att-data-class="style.html_class"><t t-esc="style.name"/></a></li>
169                                             </t>
170                                           </ul>
171                                         </li>
172                                       </ul>
173                                     </div>
174                                   </div>
175
176                                   <t t-call="website_sale.products_cart"/>
177                                 </div>
178
179                             </td>
180                             </t>
181                             <td t-if="td_product == None"/>
182                           </t>
183                         </tr>
184                       </tbody>
185                     </table>
186                     </t>
187                     <t t-if="not product_ids">
188                       <h3 class="text-center text-muted">No product found for this search</h3>
189                     </t>
190                   </div>
191                 </div>
192                 <div class="products_pager">
193                     <t t-call="website.pager">
194                         <t t-set="classname">pull-right</t>
195                     </t>
196                 </div>
197               </div>
198               <div class="oe_structure mb32"/>
199             </div>
200         </t>
201     </template>
202
203     <!-- Product Description-->
204
205     <template id="product_description" inherit_option_id="website_sale.products_cart" name="Product Description">
206         <xpath expr="//div[@class='oe_product_description']" position="inside">
207             <p class="text-muted oe_subdescription">
208                 <span t-field="product.description_sale"/>
209             </p>
210         </xpath>
211     </template>
212
213     <!-- Add to cart button-->
214
215     <template id="add_to_basket" inherit_option_id="website_sale.products_cart" name="Add to Cart">
216         <xpath expr="//div[@class='product_price']" position="inside">
217             <a t-href="./add_cart/?product_id=#{ product.id }" class="js_add_cart_json">
218                 <span class="icon-shopping-cart"/>
219             </a>
220         </xpath>
221     </template>
222
223     <!-- List view of products -->
224
225     <template id="list_view" inherit_option_id="website_sale.products" name="List View">
226         <xpath expr="//div[@id='products_grid']//table" position="replace">
227           <div class="row">
228             <t t-set="products" t-value="Ecommerce.get_products(product_ids)"/>
229             <t t-foreach="products" t-as="product">
230               <div class="col-md-12 oe_list_products oe-height-1">
231                 <t t-call="website_sale.products_cart"/>
232               </div>
233             </t>
234           </div>
235         </xpath>
236     </template>
237
238
239     <!-- product -->
240
241     <template id="product" name="Product">
242         <t t-call="website.layout">
243             <t t-set="head">
244                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
245             </t>
246             <t t-set="additional_title" t-value="product.name"/>
247             <div id="wrap">
248
249               <section class="container mt8">
250                 <div class="row">
251                   <div class="col-sm-5">
252                       <ol class="breadcrumb">
253                           <li><a href="/shop">Products</a></li>
254                           <li t-if="search.get('category')"><a t-href="/shop/" t-keep-query="category,search,facettes"><span t-field="category.name"/></a></li>
255                           <li class="active"><span t-field="product.name"></span></li>
256                       </ol>
257                   </div><div class="col-sm-3">
258                       <t t-call="website.publish_management">
259                         <t t-set="object" t-value="product"/>
260                         <t t-set="publish_edit" t-value="True"/>
261                         <li class='dropdown-submenu'>
262                             <a tabindex="-1" href="#">Promote</a>
263                             <ul class="dropdown-menu" name="sequence">
264                                 <li><a href="#" class="js_go_to_top">Push to top</a></li>
265                                 <li><a href="#" class="js_go_to_bottom">Push to bottom</a></li>
266                             </ul>
267                         </li>
268                       </t>
269                   </div><div class="col-sm-3 col-sm-offset-1">
270                         <form action="/shop/" method="get" class="pull-right">
271                             <t t-call="website_sale.search" />
272                         </form>
273                   </div>
274                 </div>
275               </section>
276
277               <section class="container oe_website_sale mb16" id="product_detail">
278                 <div class="row">
279                   <div class="col-sm-7 col-md-7 col-lg-7">
280                       <span t-field="product.image" style="max-height: 500px" t-field-options='{"widget": "image", "class": "img img-responsive"}'/>
281                   </div><div class="col-sm-5 col-md-5 col-lg-4 col-lg-offset-1">
282                       <h1 t-field="product.name">Product Name</h1>
283
284                       <form action="./add_cart/" class="js_add_cart_json">
285                           <input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
286                           <t t-if="len(product.product_variant_ids) &gt; 1">
287                               <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
288                                   <input type="radio" name="product_id" t-att-value="variant_id.id" t-att-checked="variant_id == product.product_variant_ids[0] or None"/>
289                                   <t t-esc="variant_id.variants or ''">Standard</t>
290                                   <span class="badge" t-if="variant_id.price_extra">
291                                       <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" t-field-options='{
292                                                    "widget": "monetary",
293                                                    "display_currency": "website.pricelist_id.currency_id"
294                                                }'/>
295                                   </span>
296                               </label>
297                               <br/>
298                           </t>
299
300                           <div class="product_price mt16" t-if="product.product_variant_ids">
301                               <h4>
302                                   <b><span class="oe_price" t-esc="product.product_variant_ids[0].price" /> â‚¬</b>
303
304                                   <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
305                                     <span class="text-danger" style="text-decoration: line-through;">
306                                         <t t-esc="product.product_variant_ids[0].lst_price" /> â‚¬
307                                     </span>&amp;nbsp;
308                                   </t>
309                               </h4>
310                           </div>
311                           <button class="btn btn-primary btn-lg mt8">Add to Cart</button>
312                           <hr t-if="product.description_sale"/>
313                           <p t-field="product.description_sale" class="text-muted"/>
314                           <hr/>
315                           <p class="text-muted">
316                               30-day money-back guarantee<br/>
317                               Free Shipping in U.S.<br/>
318                               Buy now, get in 2 days
319                           </p>
320                       </form>
321                   </div>
322                 </div>
323               </section>
324               <div t-field="product.website_description" class="oe_structure" id="product_full_description"/>
325             </div>
326         </t>
327     </template>
328
329     <template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Recommended Products">
330         <xpath expr="//div[@id='product_full_description']" position="after">
331             <div class="container mt32" t-if="product.recommended_products()">
332                 <h3>Customers who have bought this product also bought:</h3>
333                 <div class='row mt16' style="margin-left: 15px !important;">
334                 <t t-foreach="product.recommended_products()" t-as="product">
335                     <div class='col-md-2 thumbnail' style='width: 170px; margin-right: 16px;'>
336                         <div class='mt16 text-center'>
337                             <span t-field="product.image_small"/>
338                             <h5>
339                                 <a t-href="/shop/product/#{ product.id }/"
340                                    style="display: block">
341                                     <span t-field='product.name'
342                                           style="display: block"/>
343                                 </a>
344                             </h5>
345                         </div>
346                     </div>
347                 </t>
348                 </div>
349             </div>
350         </xpath>
351     </template>
352
353     <template id="product_attributes" inherit_option_id="website_sale.product" name="Product Attributes">
354       <xpath expr="//p[@t-field='product.description_sale']" position="after">
355         <hr t-if="product.website_attribute_ids"/>
356         <p class="text-muted">
357           <t t-set="attr" t-value="None"/>
358           <t t-foreach="product.website_attribute_ids" t-as="attribute"><br t-if="attr and attribute.attribute_id.id != attr"/><t t-if="attribute.attribute_id.id != attr"><span t-field="attribute.attribute_id"/>: </t><t t-if="attribute.attribute_id.id == attr">, </t><t t-if="attribute.attribute_id.type == 'distinct'"><span t-field="attribute.value_id"/></t><t t-if="attribute.attribute_id.type == 'float'"><span t-field="attribute.value"/></t><t t-set="attr" t-value="attribute.attribute_id.id"/></t>
359         </p>
360       </xpath>
361     </template>
362
363     <!-- Page Shop my cart -->
364
365     <template id="mycart" name="Your Cart">
366         <t t-call="website.layout">
367             <t t-set="head">
368                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
369                 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
370                 <t t-raw="head or ''"/>
371             </t>
372             <div id="wrap">
373               <div class="container oe_website_sale">
374
375                 <ul class="wizard pull-right">
376                     <li class="text-primary">Review Order<span class="chevron"></span></li>
377                     <li class="text-muted">Shipping &amp; Billing<span class="chevron"></span></li>
378                     <li class="text-muted">Payment<span class="chevron"></span></li>
379                     <li class="text-muted">Confirmation<span class="chevron"></span></li>
380                 </ul>
381                 <h1 class="mb32">Shopping Cart</h1>
382                 <div class="row">
383                     <div class="col-md-8 col-md-offset-1 oe_mycart">
384                         <div t-if="not website_sale_order or not website_sale_order.order_line" class="well well-lg">
385                             Your cart is empty!
386                         </div>
387                         <table class='table table-striped table-condensed' id="mycart_products" t-if="website_sale_order and website_sale_order.order_line">
388                             <colgroup>
389                                 <col width="80"/>
390                                 <col/>
391                                 <col width="100"/>
392                                 <col width="120"/>
393                             </colgroup>
394                             <thead>
395                                 <tr>
396                                     <th colspan="2">Product</th>
397                                     <th>Price</th>
398                                     <th>Quantity</th>
399                                 </tr>
400                             </thead>
401                             <tbody>
402                                 <tr t-foreach="website_sale_order.order_line" t-as="line">
403                                     <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
404                                     <td t-if="line.product_id.product_tmpl_id">
405                                         <span t-field="line.product_id.image_small"
406                                               t-field-options='{"widget": "image", "class": "img-rounded"}'/>
407                                     </td>
408                                     <td t-if="line.product_id.product_tmpl_id">
409                                         <div>
410                                             <a t-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/">
411                                                 <strong t-field="line.product_id.name"/>
412                                             </a>
413                                         </div>
414                                         <div class="text-muted" t-field="line.product_id.description_sale"/>
415                                     </td>
416                                     <td class="text-center">
417                                        <del class="text-danger" t-if="line.product_id.lst_price &gt; line.price_unit">
418                                            <span t-field="line.product_id.lst_price" t-field-options='{
419                                                "widget": "monetary",
420                                                "display_currency": "website.pricelist_id.currency_id"
421                                            }'/>
422                                        </del>
423                                        <span t-field="line.price_unit" t-field-options='{
424                                            "widget": "monetary",
425                                            "display_currency": "website.pricelist_id.currency_id"
426                                        }'/>
427                                     </td>
428                                     <td>
429                                         <div class="input-group">
430                                             <span class="input-group-addon">
431                                                 <a t-href="./add_cart/?remove=True&amp;order_line_id=#{ line.id }" class="mb8 js_add_cart_json">
432                                                     <span class="icon-minus"/>
433                                                 </a>
434                                             </span>
435                                             <input type="text" class="js_quantity form-control"
436                                                 t-att-data-id="line.id" t-att-value="int(line.product_uom_qty)"/>
437                                             <span class="input-group-addon">
438                                                 <a t-href="./add_cart/?order_line_id=#{ line.id }" class="mb8 float_left js_add_cart_json">
439                                                     <span class="icon-plus"/>
440                                                 </a>
441                                             </span>
442                                         </div>
443
444                                     </td>
445                                 </tr>
446                             </tbody>
447                         </table>
448                         <table class='pull-right mb16' id="mycart_total" t-if="website_sale_order">
449                             <colgroup>
450                                 <col width="100"/>
451                                 <col width="120"/>
452                             </colgroup>
453                             <thead>
454                                 <tr style="border-top: 1px solid #000">
455                                     <th><h3>Total:</h3></th>
456                                     <th class="text-right">
457                                       <h3><t t-call="website_sale.total"/></h3>
458                                     </th>
459                                 </tr>
460                                 <tr class="text-muted">
461                                     <td><abbr title="Taxes may be updated after providing shipping address">Incl. Taxes:</abbr></td>
462                                     <td class="text-right">
463                                         <span t-field="website_sale_order.amount_tax" t-field-options='{
464                                             "widget": "monetary",
465                                             "display_currency": "website.pricelist_id.currency_id"
466                                         }'/>
467                                     </td>
468                                 </tr>
469                             </thead>
470                         </table>
471                         <div class="clearfix"/>
472                         <a href="/shop" class="btn btn-default mb32"><span class="icon-long-arrow-left"/> Continue Shopping</a>
473                         <a t-if="website_sale_order and website_sale_order.order_line" href="/shop/checkout/" class="btn btn-primary pull-right mb32">Process Checkout <span class="icon-long-arrow-right"/></a>
474                         <div class="oe_structure"/>
475                     </div>
476                     <div class="col-md-3 text-muted" id="right_column">
477                         <h4>Policies</h4>
478                         <ul class="list-unstyled mb32">
479                             <li>&#9745; 30-days money-back guarantee</li>
480                             <li>&#9745; Invoice sent by e-Mail</li>
481                         </ul>
482                         <h4>Secure Payment</h4>
483                         <ul class="list-unstyled mb32">
484                             <li>&#9745; 256 bit encryption</li>
485                             <li>&#9745; Processed by Ogone</li>
486                         </ul>
487                     </div>
488                 </div>
489
490               </div>
491               <div class="oe_structure"/>
492             </div>
493         </t>
494     </template>
495
496     <!-- Page Shop -->
497
498     <template id="products_categories" inherit_option_id="website_sale.products" name="Product Categories">
499         <xpath expr="//div[@id='products_grid_before']" position="inside">
500             <ul class="nav nav-pills nav-stacked mt16">
501                 <li t-att-class=" '' if search.get('category') else 'active' "><a href="/shop/">All Products</a></li>
502                 <t t-set="categ" t-value="Ecommerce.get_categories()"/>
503                 <t t-foreach="categ[0]" t-as="category">
504                     <t t-call="website_sale.categories_recursive"/>
505                 </t>
506             </ul>
507         </xpath>
508         <xpath expr="//div[@id='products_grid_before']" position="attributes">
509             <attribute name="class">col-md-3</attribute>
510         </xpath>
511         <xpath expr="//div[@id='products_grid']" position="attributes">
512             <attribute name="class">col-md-9</attribute>
513         </xpath>
514     </template>
515
516     <template id="products_attributes" inherit_option_id="website_sale.products" name="Product Filters and Attributes">
517         <xpath expr="//div[@id='products_grid_before']" position="inside">
518             <form t-action="/shop/filter/" method="post" t-keep-query="category,search,add_filter">
519                 <ul class="nav nav-pills nav-stacked mt16">
520                     <t t-set="attribute_ids" t-value="Ecommerce.get_attribute_ids()"/>
521                     <t t-foreach="attribute_ids" t-as="attribute_id">
522                       <t t-if="attribute_id.visible">
523                         <li t-if="attribute_id.value_ids and attribute_id.type == 'distinct'">
524                             <div t-field="attribute_id.name"/>
525                             <ul class="nav nav-pills nav-stacked">
526                                 <t t-foreach="attribute_id.value_ids" t-as="value_id">
527                                     <li t-att-class="Ecommerce.has_search_filter(attribute_id.id, value_id.id) and 'active' or ''">
528                                         <label style="margin: 0 20px;">
529                                             <input type="checkbox" t-att-name="'att-%s-%s' % (attribute_id.id, value_id.id)"
530                                                 t-att-checked="Ecommerce.has_search_filter(attribute_id.id, value_id.id) and 'checked' or ''"/>
531                                             <span style="font-weight: normal" t-field="value_id.name"/>
532                                         </label>
533                                     </li>
534                                 </t>
535                             </ul>
536                         </li>
537                         <li t-if="attribute_id.type == 'float' and attribute_id.float_min != attribute_id.float_max">
538                             <div t-field="attribute_id.name"/>
539                             <t t-set="attribute" t-value="Ecommerce.has_search_filter(attribute_id.id)"/>
540                             <div style="margin: 0 20px;" class="js_slider"
541                               t-att-data-id="attribute_id.id"
542                               t-att-data-value-min="attribute and attribute[1][0] or attribute_id.float_min"
543                               t-att-data-value-max="attribute and attribute[1][1] or attribute_id.float_max"
544                               t-att-data-min="attribute_id.float_min"
545                               t-att-data-max="attribute_id.float_max"></div>
546                         </li>
547                       </t>
548                     </t>
549                 </ul>
550                 <button class="btn btn-xs btn-primary mt16">Apply filter</button>
551                 <a t-href="/shop/" t-keep-query="category,search,add_filter" class="btn btn-xs btn-default mt16">Cancel filter</a>
552             </form>
553         </xpath>
554         <xpath expr="//div[@id='products_grid_before']" position="attributes">
555             <attribute name="class">col-md-3</attribute>
556         </xpath>
557         <xpath expr="//div[@id='products_grid']" position="attributes">
558             <attribute name="class">col-md-9</attribute>
559         </xpath>
560     </template>
561
562     <template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in my cart">
563         <xpath expr="//table[@id='mycart_products']" position="after">
564             <table t-if="suggested_products" class='table table-striped table-condensed'>
565                 <colgroup>
566                     <col width="80"/>
567                     <col/>
568                     <col width="100"/>
569                     <col width="120"/>
570                 </colgroup>
571                 <thead>
572                     <tr>
573                         <th colspan="2">Suggested products</th>
574                     </tr>
575                 </thead>
576                 <tbody>
577                     <tr t-foreach="suggested_products" t-as="product">
578
579                         <td>
580                             <a t-href="/shop/product/#{ product.product_tmpl_id.id }/">
581                                 <span t-field="product.image_small"
582                                       t-field-options='{"widget": "image", "class": "img-rounded"}'/>
583                             </a>
584                         </td>
585                         <td>
586                             <div>
587                                 <a t-href="/shop/product/#{ product.product_tmpl_id.id }/">
588                                     <strong t-field="product.name"/>
589                                 </a>
590                             </div>
591                             <div class="text-muted" t-field="product.description_sale"/>
592                         </td>
593                         <td>
594                             <span t-field="product.lst_price" t-field-options='{
595                                 "widget": "monetary",
596                                 "display_currency": "website.pricelist_id.currency_id"
597                             }'/>
598                         </td>
599                         <td class="text-center">
600                             <a t-href="./add_cart/?product_id=#{ product.id }"><strong>Add to Cart</strong></a>
601                         </td>
602                     </tr>
603                 </tbody>
604             </table>
605         </xpath>
606     </template>
607
608     <template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code">
609         <xpath expr="//div[@id='right_column']" position="inside">
610             <h4>Coupon Code</h4>
611             <p>
612                 Have a coupon code? Fill in this field and apply.
613             </p>
614             <form t-if="website_sale_order and website_sale_order.order_line" action="/shop/mycart/" method="post" class="mb32">
615                 <div class="input-group">
616                     <input name="promo" class='form-control' type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
617                     <div class="input-group-btn">
618                         <button class="btn btn-default">Apply</button>
619                     </div>
620                 </div>
621             </form>
622         </xpath>
623     </template>
624
625
626     <!-- Page confirm my cart -->
627
628     <template id="checkout">
629         <t t-call="website.layout">
630           <t t-set="head">
631               <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
632               <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
633               <t t-raw="head or ''"/>
634           </t>
635           <t t-set="additional_title">Shop - Checkout</t>
636           <div id="wrap">
637             <div class="container oe_website_sale">
638                 <ul class="wizard pull-right">
639                     <li><a href="/shop/mycart" class="text-success">Review Order<span class="chevron"></span></a></li>
640                     <li class="text-primary">Shipping &amp; Billing<span class="chevron"></span></li>
641                     <li class="text-muted">Payment<span class="chevron"></span></li>
642                     <li class="text-muted">Confirmation<span class="chevron"></span></li>
643                 </ul>
644                 <h1>Your Address</h1>
645                 <form action="/shop/confirm_order/" method="post">
646
647                 <div class="row">
648                 <div class="col-md-8 oe_mycart">
649                     <h3 class="page-header mt16">Billing Information
650                         <small t-if="user_id.id == website.public_user.id"> or
651                             <a t-if="not partner" t-attf-href="/web#action=redirect&amp;url=#{ request.httprequest.url }">sign in</a>
652                         </small>
653                     </h3>
654                         <div class="row">
655                             <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''} col-lg-6">
656                                 <label class="control-label" for="contact_name">Your Name</label>
657                                 <input type="text" name="name" class="form-control" t-att-value="checkout.get('name')"/>
658                             </div>
659                             <div t-attf-class="form-group #{error.get('company') and 'has-error' or ''} col-lg-6">
660                                 <label class="control-label" for="company" style="font-weight: normal">Your Company</label>
661                                 <input type="text" name="company" class="form-control" t-att-value="checkout.get('company')"/>
662                             </div>
663                             <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
664                                 <label class="control-label" for="contact_name">Email</label>
665                                 <input type="email" name="email" class="form-control" t-att-value="checkout.get('email')"/>
666                             </div>
667                             <div t-attf-class="form-group #{ error.get('phone') and 'has-error' or ''} col-lg-6">
668                                 <label class="control-label" for="phone">Phone</label>
669                                 <input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone')"/>
670                             </div>
671
672                             <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''} col-lg-6">
673                                 <label class="control-label" for="street">Street</label>
674                                 <input type="text" name="street" class="form-control" t-att-value="checkout.get('street')"/>
675                             </div>
676                             <div class="clearfix"/>
677
678                             <div t-attf-class="form-group #{error.get('city') and 'has-error' or ''} col-lg-6">
679                                 <label class="control-label" for="city">City</label>
680                                 <input type="text" name="city" class="form-control" t-att-value="checkout.get('city')"/>
681                             </div>
682                             <div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''} col-lg-6">
683                                 <label class="control-label" for="zip">Zip / Postal Code</label>
684                                 <input type="text" name="zip" class="form-control" t-att-value="checkout.get('zip')"/>
685                             </div>
686                             <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">
687                                 <label class="control-label" for="state_id" style="font-weight: normal">State / Province</label>
688                                 <select name="state_id" class="form-control">
689                                     <option value="">select...</option>
690                                     <t t-foreach="states or []" t-as="state">
691                                         <option t-att-value="state.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
692                                     </t>
693                                 </select>
694                             </div>
695                             <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''} col-lg-6">
696                                 <label class="control-label" for="contact_name">Country</label>
697                                 <select name="country_id" class="form-control">
698                                     <option value="">Country...</option>
699                                     <t t-foreach="countries or []" t-as="country">
700                                         <option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')"><t t-esc="country.name"/></option>
701                                     </t>
702                                 </select>
703                             </div>
704
705                             <div class="clearfix"/>
706
707                             <div class="form-group col-lg-6">
708                                 <label>
709                                     <input t-if="not shipping" type="checkbox" name="shipping_different"/>
710                                     <input t-if="shipping" type="checkbox" name="shipping_different" checked="1"/>
711                                     Ship to a different address
712                                 </label>
713                             </div>
714                         </div>
715
716                         <div class="js_shipping row mb16" t-att-style="not shipping and 'display:none' or ''">
717                             <h3 class="oe_shipping col-lg-12 mt16">Shipping Information</h3>
718
719                             <div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''} col-lg-6">
720                                 <label class="control-label" for="contact_name">Name (Shipping)</label>
721                                 <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')"/>
722                             </div>
723                             <div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''} col-lg-6">
724                                 <label class="control-label" for="contact_name">Phone</label>
725                                 <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')"/>
726                             </div>
727                             <div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''} col-lg-6">
728                                 <label class="control-label" for="contact_name">Street</label>
729                                 <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')"/>
730                             </div>
731                             <div class="clearfix"/>
732                             <div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''} col-lg-6">
733                                 <label class="control-label" for="contact_name">City</label>
734                                 <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')"/>
735                             </div>
736                             <div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''} col-lg-6">
737                                 <label class="control-label" for="contact_name">Zip / Postal Code</label>
738                                 <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')"/>
739                             </div>
740                             <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
741                                 <label class="control-label" for="contact_name" style="font-weight: normal">State / Province</label>
742                                 <select name="shipping_state_id" class="form-control">
743                                     <option value="">State / Province...</option>
744                                     <t t-foreach="states or []" t-as="state">
745                                         <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
746                                     </t>
747                                 </select>
748                             </div>
749                             <div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''} col-lg-6">
750                                 <label class="control-label" for="contact_name">Country</label>
751                                 <select name="shipping_country_id" class="form-control">
752                                     <option value="">Country...</option>
753                                     <t t-foreach="countries or []" t-as="country">
754                                         <option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
755                                     </t>
756                                 </select>
757                             </div>
758                         </div>
759                         <button type="submit" class="btn btn-default btn-primary pull-right mb32">Confirm <span class="icon-long-arrow-right"/></button>
760                 </div>
761                 <div class="col-lg-offset-1 col-lg-3 text-muted">
762                     <h3 class="page-header mt16">Your Order <small><a href="/shop/mycart"><span class="icon-arrow-right"/> change</a></small></h3>
763                     <div class="row">
764                         <div class="col-sm-6 text-right">Subtotal:</div>
765                         <div class="col-sm-6"><span t-esc="website_sale_order.amount_untaxed" t-field-options='{
766                             "widget": "monetary",
767                             "display_currency": "website.pricelist_id.currency_id"
768                         }'/></div>
769                         <div class="col-sm-6 text-right">Taxes:</div>
770                         <div class="col-sm-6"><span t-field="website_sale_order.amount_tax" t-field-options='{
771                             "widget": "monetary",
772                             "display_currency": "website.pricelist_id.currency_id"
773                         }'/></div>
774                         <div class="col-sm-6 text-right"><h4>Total To Pay:</h4></div>
775                         <div class="col-sm-6"><h4><span t-field="website_sale_order.amount_total" t-field-options='{
776                             "widget": "monetary",
777                             "display_currency": "website.pricelist_id.currency_id"
778                         }'/></h4></div>
779                     </div>
780                 </div>
781             </div>
782             </form>
783           </div>
784           </div>
785         </t>
786     </template>
787
788     <template id="payment">
789         <t t-call="website.layout">
790             <t t-set="head">
791                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
792                 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
793                 <t t-raw="head or ''"/>
794             </t>
795             <t t-set="additional_title">Shop - Select Payment Mode</t>
796             <div id="wrap">
797               <div class="container oe_website_sale">
798
799                 <ul class="wizard pull-right">
800                     <li><a href="/shop/mycart" class="text-success">Review Order<span class="chevron"></span></a></li>
801                     <li><a href="/shop/checkout" class="text-success">Shipping &amp; Billing<span class="chevron"></span></a></li>
802                     <li class="text-primary">Payment<span class="chevron"></span></li>
803                     <li class="text-muted">Confirmation<span class="chevron"></span></li>
804                 </ul>
805                 <h1 class="mb32">Validate Order</h1>
806                 <div class="row">
807                 <div class="col-md-8 oe_mycart">
808                     <table class='table table-striped table-condensed' id="mycart_products" t-if="website_sale_order and website_sale_order.order_line">
809                         <colgroup>
810                             <col width="80"/>
811                             <col/>
812                             <col width="100"/>
813                             <col width="120"/>
814                         </colgroup>
815                         <thead>
816                             <tr>
817                                 <th colspan="2">Product</th>
818                                 <th>Price</th>
819                                 <th>Quantity</th>
820                             </tr>
821                         </thead>
822                         <tbody>
823                             <tr t-foreach="website_sale_order.order_line" t-as="line">
824                                 <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
825                                 <td t-if="line.product_id.product_tmpl_id">
826                                     <a t-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/">
827                                         <span t-field="line.product_id.image_small"
828                                               t-field-options='{"widget": "image", "class": "img-rounded"}'/>
829                                     </a>
830                                 </td>
831                                 <td t-if="line.product_id.product_tmpl_id">
832                                    <strong t-field="line.product_id.name"/>
833                                 </td>
834                                 <td class="text-center">
835                                    <span t-field="line.price_unit" t-field-options='{
836                                        "widget": "monetary",
837                                        "display_currency": "website.pricelist_id.currency_id"
838                                    }'/>
839                                 </td>
840                                 <td>
841                                    <div t-esc="line.product_uom_qty"/>
842                                 </td>
843                             </tr>
844                         </tbody>
845                     </table>
846                     <table class='pull-right mb16' id="mycart_total">
847                         <colgroup>
848                             <col width="100"/>
849                             <col width="120"/>
850                         </colgroup>
851                         <thead>
852                             <tr style="border-top: 1px solid #000">
853                                 <th><h3>Total:</h3></th>
854                                 <th class="text-right"><h3><span t-field="website_sale_order.amount_total" t-field-options='{
855                                     "widget": "monetary",
856                                     "display_currency": "website.pricelist_id.currency_id"
857                                 }'/></h3></th>
858                             </tr>
859                             <tr class="text-muted">
860                                 <td><abbr title="Taxes may be updated after providing shipping address">Incl. Taxes:</abbr></td>
861                                 <td class="text-right"><span t-field="website_sale_order.amount_tax" t-field-options='{
862                                     "widget": "monetary",
863                                     "display_currency": "website.pricelist_id.currency_id"
864                                 }'/></td>
865                             </tr>
866                         </thead>
867                     </table>
868                     <div class="clearfix"/>
869                     <div class="oe_structure"/>
870                   </div>
871                   <div class="col-md-3 col-md-offset-1 text-muted" id="right_column">
872                       <h4>Bill To:</h4>
873                       <div t-field="website_sale_order.partner_invoice_id"/>
874                       <div>
875                         <a href="/shop/checkout"><span class="icon-arrow-right"/> Change Address</a>
876                       </div>
877
878                       <h4 class="mt32">Ship To:</h4>
879                       <div t-field="website_sale_order.partner_shipping_id"/>
880                       <div>
881                         <a href="/shop/checkout"><span class="icon-arrow-right"/> Change Address</a>
882                       </div>
883
884                   </div>
885                 </div>
886
887                 <div class="js_payment mb64">
888                     <p>Select your payment method:</p>
889                     <div>
890                         <t t-foreach="payments or []" t-as="payment">
891                             <label>
892                                 <input t-att-value="payment.id" type="radio" name="payment_type"/> <t t-esc="payment.name"/>
893                             </label>
894                         </t>
895                     </div>
896                     <t t-foreach="payments or []" t-as="payment">
897                         <div t-att-data-id="payment.id" t-raw="payment._content" class="hidden"/>
898                     </t>
899                     <a href="/shop/payment_validate/" class="btn btn-primary mt16">Validate &amp; Pay <span class="icon-long-arrow-right"/></a>
900                 </div>
901
902               </div>
903               <div class="oe_structure"/>
904             </div>
905
906         </t>
907     </template>
908
909     <template id="total">
910       <span t-field="website_sale_order.amount_total" t-field-options='{
911           "widget": "monetary",
912           "display_currency": "website.pricelist_id.currency_id"
913         }'/>
914     </template>
915  </data>
916 </openerp>