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