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