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