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