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