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