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