[MERGE] forward port of branch saas-5 up to 655a5b9
[odoo/odoo.git] / addons / website_sale / views / templates.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5 <!-- Layout and common templates -->
6
7 <template id="assets_frontend" inherit_id="website.assets_frontend" name="Shop">
8   <xpath expr="." position="inside">
9       <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
10       <link rel='stylesheet' href='/website_sale/static/src/css/website_mail.css'/>
11       <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
12       <script type="text/javascript" src="/website_sale/static/src/js/website_sale_payment.js"></script>
13       <script type="text/javascript" src="/website_sale/static/src/js/website_sale_validate.js"></script>
14       <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_buy.js"></script>
15   </xpath>
16 </template>
17
18 <template id="assets_editor" inherit_id="website.assets_editor" name="Shop Editor" groups="base.group_sale_manager">
19   <xpath expr="." position="inside">
20       <script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js"></script>
21       <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_shop.js"></script>
22   </xpath>
23 </template>
24
25 <template id="header" inherit_id="website.layout" name="Header Shop My Cart Link">
26   <xpath expr="//header//ul[@id='top_menu']/li" position="before">
27       <t t-set="website_sale_order" t-value="website.sale_get_order()"/>
28       <li t-att-class="'' if website_sale_order and website_sale_order.cart_quantity else 'hidden'">
29           <a href="/shop/cart">
30               <i class="fa fa-shopping-cart"></i>
31               My cart <sup t-attf-class="my_cart_quantity label label-primary" t-esc="website_sale_order and website_sale_order.cart_quantity or ''"/>
32           </a>
33       </li>
34   </xpath>
35 </template>
36
37 <template id="search" name="Search hidden fields">
38   <t t-if="attrib_values">
39     <t t-foreach="attrib_values" t-as="a">
40       <input type="hidden" name="attrib" t-att-value="'%s-%s' % (a[0], a[1])"/>
41     </t>
42   </t>
43   <input t-if="category" type="hidden" name="category" t-att-value="int(category or 0)"/>
44   <div class="input-group">
45     <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search"/>
46     <span class="input-group-btn">
47       <a class="btn btn-default a-submit"><i class="fa fa-search"/></a>
48     </span>
49   </div>
50 </template>
51
52 <template id="404">
53   <t t-call="website.layout">
54       <div id="wrap">
55           <div class="oe_structure oe_empty">
56               <div class="container">
57                   <h1 class="mt32">Product not found!</h1>
58                   <p>Sorry, this product is not available anymore.</p>
59                   <p><a t-attf-href="/shop">Return to the product list.</a></p>
60               </div>
61           </div>
62       </div>
63   </t>
64 </template>
65
66 <!-- Product item used by /shop and /shop/cart -->
67
68 <template id="products_item" name="Product item">
69   <form action="/shop/cart/update" method="post" style="display: inline-block;">
70   <div itemscope="itemscope" itemtype="http://schema.org/Product">
71   <div class="ribbon-wrapper">
72     <div class="ribbon btn btn-danger">Sale</div>
73   </div>
74   <div class="oe_product_image">
75       <a itemprop="url" t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']>1 else None))">
76           <img itemprop="image" class="img img-responsive" t-attf-src="/website/image/product.template/#{product.id}/image#{'' if product_image_big else '?max_width=300&amp;max_height=300'}"/>
77       </a>
78   </div>
79   <section>
80       <h5><strong><a itemprop="name" t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']>1 else None))" t-field="product.name"/></strong></h5>
81       <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price" t-if="product.product_variant_ids">
82           <b>
83               <t t-if="(compute_currency(product.lst_price) - product.price) &gt; 0.1">
84                 <del class="text-danger" style="white-space: nowrap;" t-field="product.lst_price" t-field-options='{
85                   "widget": "monetary",
86                   "from_currency": "website.currency_id",
87                   "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
88                 }'/>&amp;nbsp;
89               </t>
90               <span t-field="product.price" style="white-space: nowrap;"  t-field-options='{
91                    "widget": "monetary",
92                    "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
93                }'>
94               </span>
95               <span itemprop="price" style="display:none;" t-esc="product.price"/>
96               <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
97           </b>
98       </div>
99   </section>
100   </div>
101   </form>
102 </template>
103
104 <template id="products_description" inherit_id="website_sale.products_item" optional="disabled" name="Product Description">
105   <xpath expr="//div[@class='product_price']" position="before">
106       <div class="text-info oe_subdescription" contenteditable="false">
107         <div itemprop="description" t-field="product.description_sale"></div>
108       </div>
109   </xpath>
110 </template>
111
112 <template id="products_add_to_cart" inherit_id="website_sale.products_item" optional="disabled" name="Add to Cart">
113   <xpath expr="//div[@class='product_price']" position="inside">
114     <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
115     <a class="btn btn-default btn-xs fa fa-shopping-cart a-submit"/>
116   </xpath>
117 </template>
118
119 <!-- /shop product listing -->
120
121 <template id="products" name="Products">
122   <t t-call="website.layout">
123       <!--t t-set="head">
124           <t t-call="web.jqueryui_conflict">
125             <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
126           </t>
127           <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
128           <t t-raw="head or ''"/>
129       </t-->
130       <t t-set="additional_title">Shop</t>
131       <div id="wrap" class="js_sale">
132         <div class="oe_structure"/>
133         <div class="container oe_website_sale">
134           <div class="products_pager">
135             <div class="row">
136               <form t-att-action="keep('/shop',search='')" method="get" class="pagination form-inline col-md-3">
137                 <t t-call="website_sale.search"/>
138               </form>
139               <t t-call="website.pager"/>
140             </div>
141           </div>
142           <div class='row'>
143             <div class="hidden" id="products_grid_before"></div>
144             <div class="col-md-12" id="products_grid">
145               <table width="100%">
146                 <tbody>
147                   <tr t-ignore="true">
148                     <td t-foreach="range(0,rows)" t-as="row" t-attf-width="#{100/rows}%"></td>
149                   </tr>
150                   <tr t-foreach="bins" t-as="tr_product">
151                     <t t-foreach="tr_product" t-as="td_product">
152                       <t t-if="td_product">
153                       <t t-set="product" t-value="td_product['product']"/>
154                       <td t-att-colspan="td_product['x'] != 1 and td_product['x']"
155                           t-att-rowspan="td_product['y'] != 1 and td_product['y']"
156                           t-attf-class="oe_product oe_grid oe-height-#{td_product['y']*2} #{ td_product['class'] }">
157
158                           <div class="oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
159
160                             <div class="css_options" t-ignore="true" groups="base.group_website_publisher">
161                               <div t-attf-class="dropdown js_options" t-att-data-id="product.id">
162                                 <button class="btn btn-default" t-att-id="'dopprod-%s' % product.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></button>
163                                 <ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % product.id">
164                                   <li class='dropdown-submenu'>
165                                     <a tabindex="-1" href="#">Size</a>
166                                     <ul class="dropdown-menu" name="size">
167                                       <li><a href="#">
168                                         <table>
169                                           <tr>
170                                             <td class="selected"></td>
171                                             <td t-att-class="product.website_size_x > 1 and 'selected'"></td>
172                                             <td t-att-class="product.website_size_x > 2 and 'selected'"></td>
173                                             <td t-att-class="product.website_size_x > 3 and 'selected'"></td>
174                                           </tr>
175                                           <tr>
176                                             <td t-att-class="product.website_size_y > 1 and 'selected'"></td>
177                                             <td t-att-class="product.website_size_y > 1 and product.website_size_x > 1 and 'selected'"></td>
178                                             <td t-att-class="product.website_size_y > 1 and product.website_size_x > 2 and 'selected'"></td>
179                                             <td t-att-class="product.website_size_y > 1 and product.website_size_x > 3 and 'selected'"></td>
180                                           </tr>
181                                           <tr>
182                                             <td t-att-class="product.website_size_y > 2 and 'selected'"></td>
183                                             <td t-att-class="product.website_size_y > 2 and product.website_size_x > 1 and 'selected'"></td>
184                                             <td t-att-class="product.website_size_y > 2 and product.website_size_x > 2 and 'selected'"></td>
185                                             <td t-att-class="product.website_size_y > 2 and product.website_size_x > 3 and 'selected'"></td>
186                                           </tr>
187                                           <tr>
188                                             <td t-att-class="product.website_size_y > 3 and 'selected'"></td>
189                                             <td t-att-class="product.website_size_y > 3 and product.website_size_x > 1 and 'selected'"></td>
190                                             <td t-att-class="product.website_size_y > 3 and product.website_size_x > 2 and 'selected'"></td>
191                                             <td t-att-class="product.website_size_y > 3 and product.website_size_x > 3 and 'selected'"></td>
192                                           </tr>
193                                         </table>
194                                       </a></li>
195                                     </ul>
196                                   </li>
197                                   <li class='dropdown-submenu'>
198                                     <a tabindex="-1" href="#">Styles</a>
199                                     <ul class="dropdown-menu" name="style">
200                                       <t t-foreach="styles" t-as="style">
201                                         <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>
202                                       </t>
203                                     </ul>
204                                   </li>
205                                   <li class='dropdown-submenu'>
206                                       <a tabindex="-1" href="#">Promote</a>
207                                       <ul class="dropdown-menu" name="sequence">
208                                           <li><a href="#" class="js_go_to_top">Push to top</a></li>
209                                           <li><a href="#" class="js_go_up">Push up</a>
210                                           </li>
211                                           <li><a href="#" class="js_go_down">Push down</a></li>
212                                           <li><a href="#" class="js_go_to_bottom">Push to bottom</a></li>
213                                       </ul>
214                                   </li>
215                                 </ul>
216                               </div>
217                             </div>
218                             <t t-set="product_image_big" t-value="td_product['x']+td_product['y'] > 2"/>
219                             <t t-call="website_sale.products_item"/>
220                           </div>
221
222                       </td>
223                       </t>
224                       <td t-if="not td_product" class="oe-height-2"/>
225                     </t>
226                   </tr>
227                 </tbody>
228               </table>
229               <t t-if="not bins">
230                 <div class="text-center text-muted">
231                   <h3 class="css_editable_display">No product defined.</h3>
232                   <t groups="base.group_website_publisher">
233                     <p groups="base.group_sale_manager">Use the <i>'Content'</i> top menu to create a new product.</p>
234                   </t>
235                 </div>
236               </t>
237             </div>
238           </div>
239           <div class="products_pager">
240               <t t-call="website.pager"/>
241           </div>
242         </div>
243         <div class="oe_structure mb32"/>
244       </div>
245   </t>
246 </template>
247
248 <!-- Add to cart button-->
249
250 <template id="categories_recursive" name="Category list">
251   <li t-att-class="'active' if c.id == int(category or 0) else ''">
252       <a t-att-href="keep('/shop/category/' + slug(c), category=0)" t-field="c.name"></a>
253       <ul t-if="c.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
254           <t t-foreach="c.child_id" t-as="c">
255               <t t-call="website_sale.categories_recursive"/>
256           </t>
257       </ul>
258   </li>
259 </template>
260
261 <template id="products_categories" inherit_id="website_sale.products" optional="disabled" name="Product Categories">
262   <xpath expr="//div[@id='products_grid_before']" position="inside">
263       <ul class="nav nav-pills nav-stacked mt16">
264           <li t-att-class=" '' if category else 'active' "><a t-att-href="keep('/shop',category=0)">All Products</a></li>
265           <t t-foreach="categories" t-as="c">
266               <t t-call="website_sale.categories_recursive"/>
267           </t>
268       </ul>
269   </xpath>
270   <xpath expr="//div[@id='products_grid_before']" position="attributes">
271       <attribute name="class">col-md-3 hidden-xs</attribute>
272   </xpath>
273   <xpath expr="//div[@id='products_grid']" position="attributes">
274       <attribute name="class">col-md-9</attribute>
275   </xpath>
276 </template>
277
278 <template id="products_attributes" inherit_id="website_sale.products" optional="disabled" name="Product Attribute's Filters">
279   <xpath expr="//div[@id='products_grid_before']" position="inside">
280       <form class="js_attributes" method="get">
281           <input type="hidden" name="search" t-att-value="search"/>
282           <ul class="nav nav-pills nav-stacked mt16">
283               <t t-foreach="attributes" t-as="a">
284                 <t t-if="a.type != 'hidden'">
285                   <li t-if="a.value_ids and len(a.value_ids) > 1">
286                       <div><strong t-field="a.name"/></div>
287                       <t t-if="a.type == 'select'">
288                         <select class="form-control" name="attrib">
289                           <option value=""/>
290                           <t t-foreach="a.value_ids" t-as="v">
291                             <option t-att-value="'%s-%s' % (a.id,v.id)" t-esc="v.name" t-att-selected="'selected' if v.id in attrib_set else ''"/>
292                           </t>
293                         </select>
294                       </t>
295                       <t t-if="a.type == 'radio'">
296                         <ul class="nav nav-pills nav-stacked">
297                             <t t-foreach="a.value_ids" t-as="v">
298                                 <li t-att-class="'active' if v.id in attrib_set else ''">
299                                     <label style="margin: 0 20px;">
300                                         <input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else ''"/>
301                                         <span style="font-weight: normal" t-field="v.name"/>
302                                     </label>
303                                 </li>
304                             </t>
305                         </ul>
306                       </t>
307                       <t t-if="a.type == 'color'">
308                         <t t-foreach="a.value_ids" t-as="v">
309                           <label t-attf-style="background-color:#{v.color or v.name}"
310                               t-attf-class="css_attribute_color #{'active' if v.id in attrib_set else ''}">
311                               <input type="checkbox"
312                                   name="attrib"
313                                   t-att-value="'%s-%s' % (a.id,v.id)"
314                                   t-att-checked="'checked' if v.id in attrib_set else ''"
315                                   t-att-title="v.name"/>
316                           </label>
317                         </t>
318                       </t>
319                   </li>
320                 </t>
321               </t>
322           </ul>
323       </form>
324   </xpath>
325   <xpath expr="//div[@id='products_grid_before']" position="attributes">
326       <attribute name="class">col-md-3 hidden-xs</attribute>
327   </xpath>
328   <xpath expr="//div[@id='products_grid']" position="attributes">
329       <attribute name="class">col-md-9</attribute>
330   </xpath>
331 </template>
332
333 <template id="products_list_view" inherit_id="website_sale.products" optional="disabled" name="List View">
334   <xpath expr="//div[@id='products_grid']//table" position="replace">
335     <t t-foreach="products" t-as="product">
336       <div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
337         <t t-call="website_sale.products_item"/>
338       </div>
339     </t>
340   </xpath>
341 </template>
342
343 <!-- /shop/product product page -->
344
345 <template id="product" name="Product">
346   <t t-call="website.layout">
347           <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
348       <t t-set="additional_title" t-value="product.name"/>
349       <div itemscope="itemscope" itemtype="http://schema.org/Product" id="wrap" class="js_sale">
350
351         <section class="container mt8">
352           <div class="row">
353             <div class="col-sm-4">
354                 <ol class="breadcrumb">
355                     <li><a t-att-href="keep(category=0)" onclick="history.go(-1); return false;">Products</a></li>
356                     <li t-if="category"><a t-att-href="keep()" t-field="category.name"/></li>
357                     <li class="active"><span t-field="product.name"/></li>
358                 </ol>
359             </div>
360             <div class="col-sm-3">
361               <form t-att-action="keep(search=0)" method="get" class="pull-right">
362                   <t t-call="website_sale.search"/>
363               </form>
364             </div>
365             <div class="col-sm-4" groups="base.group_sale_manager">
366                 <t t-call="website.publish_management">
367                   <t t-set="object" t-value="product"/>
368                   <t t-set="publish_edit" t-value="True"/>
369                   <t t-set="action" t-value="'product.product_template_action'"/>
370                 </t>
371             </div>
372           </div>
373         </section>
374
375         <section t-attf-class="container oe_website_sale #{(compute_currency(product.lst_price) - product.price) &gt; 0.1 and 'discount'}" id="product_detail">
376           <div class="row">
377             <div class="col-sm-7 col-md-7 col-lg-7">
378                 <span itemprop="image" t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img"}'/>
379             </div><div class="col-sm-5 col-md-5 col-lg-4 col-lg-offset-1">
380                 <h1 itemprop="name" t-field="product.name">Product Name</h1>
381                 <span itemprop="url" style="display:none;" t-esc="'/shop/product/%s' % slug(product)"/>
382
383                 <form t-att-action="keep('/shop/cart/update')" class="js_add_cart_variants" method="POST">
384
385                   <div class="js_product">
386                     <t t-placeholder="select">
387                       <input type="hidden" class="product_id" name="product_id" t-att-value="int(product.product_variant_ids[0]) if len(product.product_variant_ids) == 1 else '0'"/>
388                       <t t-call="website_sale.variants">
389                         <t t-set="ul_class" t-value="'nav-stacked'"/>
390                       </t>
391                     </t>
392
393                     <t t-call="website_sale.product_price"/>
394                     <p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</p>
395
396                     <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>
397                   </div>
398
399                 </form>
400
401                 <hr t-if="product.description_sale"/>
402                 <div><p t-field="product.description_sale" class="text-muted"/></div>
403                 <hr/>
404                 <p class="text-muted">
405                     30-day money-back guarantee<br/>
406                     Free Shipping in U.S.<br/>
407                     Buy now, get in 2 days
408                 </p>
409             </div>
410           </div>
411         </section>
412         <div itemprop="description" t-field="product.website_description" class="oe_structure mt16" id="product_full_description"/>
413
414       </div>
415   </t>
416 </template>
417
418 <template id="product_quantity" inherit_id="website_sale.product" optional="enabled" name="Select Quantity">
419   <xpath expr="//a[@id='add_to_cart']" position="before">
420     <div class="css_quantity input-group" style="width: 108px;">
421         <span class="input-group-addon">
422             <a t-attf-href="#" class="mb8 js_add_cart_json">
423                 <i class="fa fa-minus"></i>
424             </a>
425         </span>
426         <input type="text" class="js_quantity form-control" data-min="1" name="add_qty" value="1"/>
427         <span class="input-group-addon">
428             <a t-attf-href="#" class="mb8 float_left js_add_cart_json">
429                 <i class="fa fa-plus"></i>
430             </a>
431         </span>
432     </div>
433   </xpath>
434 </template>
435
436 <template id="product_price">
437   <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16">
438       <h4 class="oe_price_h4 css_editable_mode_hidden">
439           <span class="text-danger oe_default_price" style="text-decoration: line-through; white-space: nowrap;"
440             t-field="product.lst_price"
441             t-field-options='{
442               "widget": "monetary",
443               "from_currency": "website.currency_id",
444               "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
445            }'/>
446           <b class="oe_price" style="white-space: nowrap;"
447             t-field="product.price"
448             t-field-options='{
449                "widget": "monetary",
450                "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
451            }'/>
452           <span itemprop="price" style="display:none;" t-esc="product.price"/>
453           <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
454       </h4>
455       <h4 class="css_editable_mode_display" style="display: none;">
456         <span t-field="product.lst_price"
457             t-field-options='{
458                "widget": "monetary",
459                "display_currency": "website.pricelist_id.currency_id"
460            }'/>
461       </h4>
462       <h4 class="hidden oe_not_available bg-warning">Product not available</h4>
463   </div>
464 </template>
465
466 <template id="product_variants" inherit_id="website_sale.product" optional="disabled" name="List View of Variants">
467   <xpath expr="//t[@t-placeholder='select']" position="replace">
468     <input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
469     <t t-if="len(product.product_variant_ids) &gt; 1">
470       <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
471         <input type="radio" name="product_id" t-att-value="variant_id.id"/>
472         <span t-esc="variant_id.name_get()[0][1]"/>
473         <span class="badge" t-if="variant_id.price_extra">
474           <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" style="white-space: nowrap;" t-field-options='{
475                 "widget": "monetary",
476                 "from_currency": "website.currency_id",
477                 "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
478               }'/>
479         </span>
480       </label>
481     </t>
482   </xpath>
483 </template>
484
485 <template id="variants">
486   <t t-set="attribute_value_ids" t-value="get_attribute_value_ids(product)"/>
487   <ul t-attf-class="list-unstyled js_add_cart_variants #{ul_class}" t-att-data-attribute_value_ids="attribute_value_ids">
488     <t t-foreach="product.attribute_line_ids" t-as="variant_id">
489       <li t-if="len(variant_id.value_ids) > 1">
490
491         <strong t-field="variant_id.attribute_id.name"/>
492
493         <t t-if="variant_id.attribute_id.type in ['select', 'hidden']">
494           <select class="form-control js_variant_change" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)">
495             <t t-foreach="variant_id.value_ids" t-as="value_id">
496               <option t-att-value="value_id.id">
497                   <span t-field="value_id.name"/>
498                   <span t-if="value_id.price_extra">
499                       <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-field-options='{
500                                "widget": "monetary",
501                                 "from_currency": "website.currency_id",
502                                "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
503                            }'/>
504                   </span>
505               </option>
506             </t>
507           </select>
508         </t>
509
510         <t t-if="variant_id.attribute_id.type == 'radio'">
511           <ul class="list-unstyled">
512               <t t-set="inc" t-value="0"/>
513               <t t-foreach="variant_id.value_ids" t-as="value_id">
514                   <li t-if="value_id.product_ids" class="form-group js_attribute_value" style="margin: 0;">
515                       <label class="control-label" style="margin: 0 20px;">
516                           <input type="radio" class="js_variant_change" t-att-checked="'checked' if not inc else ''" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/>
517                           <span t-field="value_id.name"/>
518                           <span class="badge" t-if="value_id.price_extra">
519                               <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-field-options='{
520                                       "widget": "monetary",
521                                       "from_currency": "website.currency_id",
522                                       "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
523                                    }'/>
524                           </span>
525                       </label>
526                   </li>
527                   <t t-set="inc" t-value="inc+1"/>
528               </t>
529           </ul>
530         </t>
531
532         <t t-if="variant_id.attribute_id.type == 'color'">
533           <ul class="list-inline">
534               <t t-set="inc" t-value="0"/>
535               <li t-foreach="variant_id.value_ids" t-as="value_id">
536                   <label t-attf-style="background-color:#{value_id.color or value_id.name}"
537                       t-attf-class="css_attribute_color #{'active' if not inc else ''}">
538                     <input type="radio" class="js_variant_change"
539                       t-att-checked="'checked' if not inc else ''"
540                       t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)"
541                       t-att-value="value_id.id"
542                       t-att-title="value_id.name"/>
543                   </label>
544                   <t t-set="inc" t-value="inc+1"/>
545               </li>
546           </ul>
547         </t>
548
549       </li>
550     </t>
551   </ul>
552 </template>
553
554 <template id="recommended_products" inherit_id="website_sale.product" optional="enabled" name="Alternative Products">
555   <xpath expr="//div[@id='product_full_description']" position="after">
556       <div class="container mt32" t-if="product.alternative_product_ids">
557           <h3>Suggested alternatives:</h3>
558           <div class='row mt16' style="margin-left: 15px !important;">
559           <t t-foreach="product.alternative_product_ids" t-as="product">
560               <div class='col-md-2 thumbnail' style='width: 170px; margin-right: 16px;'>
561                   <div class='mt16 text-center'>
562                       <span t-field="product.image_small" t-field-options='{"widget": "image", "class": "img-rounded shadow" }'/>
563                       <h5>
564                           <a t-attf-href="/shop/product/#{ slug(product) }" style="display: block">
565                               <span t-field='product.name' style="display: block"/>
566                           </a>
567                       </h5>
568                   </div>
569               </div>
570           </t>
571           </div>
572       </div>
573   </xpath>
574 </template>
575
576 <template id="product_attributes" inherit_id="website_sale.product" optional="enabled" name="Product attributes">
577   <xpath expr="//p[@t-field='product.description_sale']" position="after">
578     <hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])"/>
579     <p class="text-muted">
580       <t t-foreach="product.attribute_line_ids" t-as="variant_id">
581         <t t-if="len(variant_id.value_ids)==1">
582           <span t-field="variant_id.attribute_id"/>: <span t-field="variant_id.value_ids[0].name"/><br/>
583         </t>
584       </t>
585     </p>
586   </xpath>
587 </template>
588
589 <!-- Product options: OpenChatter -->
590
591 <template id="product_comment" inherit_id="website_sale.product" optional="disabled" name="Discussion">
592     <xpath expr="//div[@t-field='product.website_description']" position="after">
593         <hr class="mb32"/>
594         <section class="container">
595             <div class="row col-md-10 col-md-offset-1">
596                 <div class="text-muted">
597                     <h3 class="fa fa-comment-o">
598                         <a id="comments">
599                             <t t-if="len(product.website_message_ids) &lt;= 1" ><t t-esc="len(product.website_message_ids)"/> comment</t>
600                             <t t-if="len(product.website_message_ids) > 1"><t t-esc="len(product.website_message_ids)"/> comments</t>
601                         </a>
602                     </h3>
603                 </div>
604                 <ul class="media-list" id="comments-list"  t-if="product.website_message_ids">
605                     <li t-foreach="product.website_message_ids" t-as="message" class="media">
606                         <div class="media-body oe_msg">
607                             <img class="media-object pull-left oe_msg_avatar" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(message.author_id.id)" style="width: 50px; margin-right: 10px;"/>
608                             <div class="media-body oe_msg_content">
609                                 <t t-call="website.publish_short">
610                                     <t t-set="object" t-value="message"/>
611                                 </t>
612                                 <h5 class="media-heading">
613                                     <span t-field="message.author_id"/> <small>on <span t-field="message.date"/></small>
614                                 </h5>
615                                 <div t-field="message.body"/>
616                                 <div>
617                                     <div class="oe_msg_attachment" t-foreach='message.attachment_ids' t-as='attachment'>
618                                         <a t-att-href="'/mail/download_attachment?model=mail.message&amp;id='+str(message.id)+'&amp;method=download_attachment&amp;attachment_id='+str(attachment.id)" target="_blank">
619                                             <t t-if="attachment.file_type_icon == 'webimage'">
620                                                 <img t-att-src="'/web/binary/image?model=ir.attachment&amp;field=datas&amp;id=' + str(attachment.id) + '&amp;resize=100,80'"
621                                                     class='oe_attachment_embedded'></img>
622                                             </t>
623                                             <t t-if="attachment.file_type_icon != 'webimage'">
624                                                 <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.file_type + '.png'"
625                                                     class='oe_attachment_webimage'></img>
626                                             </t>
627                                             <div class='oe_attachment_name'><t t-raw='attachment.name' /></div>
628                                         </a>
629                                     </div>
630                                 </div>
631                             </div>
632                         </div>
633                     </li>
634                 </ul>
635                 <div class="css_editable_mode_hidden">
636                     <form id="comment" t-attf-action="/shop/product/comment/#{product.id}" method="POST">
637                         <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
638                         <div class="pull-left mb32" style="width: 75%%">
639                             <textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
640                             <a class="btn btn-primary mt8 a-submit">Post</a>
641                         </div>
642                     </form>
643                 </div>
644             </div>
645         </section>
646     </xpath>
647 </template>
648
649 <!-- /shop/cart -->
650
651 <template id="cart" name="Shopping Cart">
652   <t t-call="website.layout">
653           <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
654       <div id="wrap">
655         <div class="container oe_website_sale">
656
657           <ul class="wizard pull-right">
658               <li class="text-primary">Review Order<span class="chevron"></span></li>
659               <li class="text-muted">Shipping &amp; Billing<span class="chevron"></span></li>
660               <li class="text-muted">Payment<span class="chevron"></span></li>
661               <li class="text-muted">Confirmation<span class="chevron"></span></li>
662           </ul>
663           <h1 class="mb32">Shopping Cart</h1>
664           <div class="row">
665               <div class="col-md-8 col-sm-9 oe_cart">
666                   <t t-set="website_sale_order" t-value="website.sale_get_order()"/>
667                   <div t-if="not website_sale_order or not website_sale_order.website_order_line" class="well well-lg">
668                       Your cart is empty!
669                   </div>
670                   <table class='table table-striped table-condensed' id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
671                       <thead>
672                           <tr>
673                               <th colspan="2" width="100">Product</th>
674                               <th width="100">Price</th>
675                               <th width="120">Quantity</th>
676                           </tr>
677                       </thead>
678                       <tbody>
679                         <t t-foreach="website_sale_order.website_order_line" t-as="line">
680                           <tr>
681                               <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
682                               <td align="center" t-if="line.product_id.product_tmpl_id">
683                                   <span t-field="line.product_id.image_small"
684                                         t-field-options='{"widget": "image", "class": "img-rounded"}'/>
685                               </td>
686                               <td t-if="line.product_id.product_tmpl_id">
687                                   <div>
688                                       <a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
689                                           <strong t-esc="line.product_id.name_get()[0][1]"/>
690                                       </a>
691                                   </div>
692                                   <div class="text-muted" t-field="line.name"/>
693                               </td>
694                               <td class="text-center" name="price">
695                                 <t t-if="(compute_currency(line.product_id.lst_price) - line.price_unit) &gt; 0.01">
696                                   <del class="text-danger" style="white-space: nowrap;"
697                                     t-field="line.product_id.lst_price" t-field-options='{
698                                         "widget": "monetary",
699                                         "from_currency": "website.currency_id",
700                                         "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
701                                     }'/>&amp;nbsp;
702                                 </t>
703                                 <span t-field="line.price_unit" style="white-space: nowrap;" t-field-options='{
704                                      "widget": "monetary",
705                                      "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
706                                  }'/>
707                               </td>
708                               <td class="text-center">
709                                   <div class="input-group">
710                                       <span class="input-group-addon">
711                                           <a t-attf-href="#" class="mb8 js_add_cart_json" data-no-instant="">
712                                               <i class="fa fa-minus"></i>
713                                           </a>
714                                       </span>
715                                       <input type="text" class="js_quantity form-control"
716                                           t-att-data-line-id="line.id" 
717                                           t-att-data-product-id="line.product_id.id"
718                                           t-att-value="int(line.product_uom_qty)"/>
719                                       <span class="input-group-addon">
720                                           <a t-attf-href="#" class="mb8 float_left js_add_cart_json" data-no-instant="">
721                                               <i class="fa fa-plus"></i>
722                                           </a>
723                                       </span>
724                                   </div>
725                               </td>
726                           </tr>
727                         </t>
728                       </tbody>
729                   </table>
730                   <t t-call="website_sale.total"/>
731                   <div class="clearfix"/>
732
733                   <a t-if="not optional_products and website_sale_order and website_sale_order.website_order_line" class="btn btn-primary pull-right mb32" href="/shop/checkout">Process Checkout <span class="fa fa-long-arrow-right"/></a>
734
735                   <div class="oe_structure"/>
736               </div>
737               <div class="col-lg-3 col-lg-offset-1 col-sm-3 col-md-3 text-muted" id="right_column">
738                   <h4>Policies</h4>
739                   <ul class="list-unstyled mb32">
740                       <li>&#9745; 30-days money-back guarantee</li>
741                       <li>&#9745; Invoice sent by e-Mail</li>
742                   </ul>
743                   <h4>Secure Payment</h4>
744                   <ul class="list-unstyled mb32">
745                       <li>&#9745; 256 bit encryption</li>
746                       <li>&#9745; Processed by Ogone</li>
747                   </ul>
748               </div>
749           </div>
750
751         </div>
752         <div class="oe_structure"/>
753       </div>
754   </t>
755 </template>
756
757 <template id="suggested_products_list" inherit_id="website_sale.cart" optional="enabled" name="Suggested Products in my cart">
758   <xpath expr="//table[@id='cart_products']" position="after">
759       <table t-if="suggested_products" class='table table-striped table-condensed'>
760           <colgroup>
761               <col width="80"/>
762               <col/>
763               <col width="100"/>
764               <col width="120"/>
765           </colgroup>
766           <thead>
767               <tr>
768                   <th colspan="4">Suggested products:</th>
769               </tr>
770           </thead>
771           <tbody>
772               <tr t-foreach="suggested_products" t-as="product">
773
774                   <td>
775                       <a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
776                           <span t-field="product.image_small"
777                                 t-field-options='{"widget": "image", "class": "img-rounded"}'/>
778                       </a>
779                   </td>
780                   <td>
781                       <div>
782                           <a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
783                               <strong t-field="product.name"/>
784                           </a>
785                       </div>
786                       <div class="text-muted" t-field="product.description_sale"/>
787                   </td>
788                   <td>
789                       <t t-if="(compute_currency(product.lst_price) - product.price) &gt; 0.1">
790                         <del class="text-danger" style="white-space: nowrap;"
791                           t-field="product.lst_price" t-field-options='{
792                               "widget": "monetary",
793                               "from_currency": "website.currency_id",
794                               "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
795                           }'/>&amp;nbsp;
796                       </t>
797                       <span t-field="product.price" style="white-space: nowrap;" t-field-options='{
798                            "widget": "monetary",
799                            "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
800                        }'/>
801                   </td>
802                   <td class="text-center">
803                       <form action="/shop/cart/update" method="post">
804                           <input name="product_id" t-att-value="product.id" type="hidden"/>
805                           <a class="btn btn-link a-submit"><strong>Add to Cart</strong></a>
806                       </form>
807                   </td>
808               </tr>
809           </tbody>
810       </table>
811   </xpath>
812 </template>
813
814 <template id="continue_shopping" inherit_id="website_sale.cart" optional="enabled" name="Continue Shopping Button">
815   <xpath expr="//a[@href='/shop/checkout']" position="before">
816     <a href="/shop" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Continue Shopping</a>
817   </xpath>
818 </template>
819
820 <template id="reduction_code" inherit_id="website_sale.cart" optional="disabled" name="Reduction Code">
821   <xpath expr="//div[@id='right_column']" position="inside">
822       <h4>Coupon Code</h4>
823       <p>
824           Have a coupon code? Fill in this field and apply.
825       </p>
826       <form t-if="website_sale_order and website_sale_order.website_order_line" action="/shop/pricelist" method="post" class="mb32">
827           <div class="input-group">
828               <input name="promo" class='form-control' type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
829               <div class="input-group-btn">
830                   <a class="btn btn-default a-submit">Apply</a>
831               </div>
832           </div>
833       </form>
834   </xpath>
835 </template>
836
837 <!-- /shop/checkout -->
838
839 <template id="checkout">
840   <t t-call="website.layout">
841         <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
842     <t t-set="additional_title">Shop - Checkout</t>
843     <div id="wrap">
844       <div class="container oe_website_sale">
845           <ul class="wizard pull-right">
846               <li><a href="/shop/cart" class="text-success">Review Order<span class="chevron"></span></a></li>
847               <li class="text-primary">Shipping &amp; Billing<span class="chevron"></span></li>
848               <li class="text-muted">Payment<span class="chevron"></span></li>
849               <li class="text-muted">Confirmation<span class="chevron"></span></li>
850           </ul>
851           <h1>Your Address</h1>
852           <form action="/shop/confirm_order" method="post">
853
854           <div class="row">
855           <div class="col-md-8 oe_cart">
856               <h3 class="page-header mt16">Billing Information
857                   <small groups="base.group_public"> or
858                       <a class='btn btn-primary' t-if="not partner" t-attf-href="/web?redirect=#{ request.httprequest.url }">Sign in</a>
859                   </small>
860               </h3>
861               <div class="row">
862                   <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''} col-lg-6">
863                       <label class="control-label" for="contact_name">Your Name</label>
864                       <input type="text" name="name" class="form-control" t-att-value="checkout.get('name')"/>
865                   </div>
866                   <div t-if="has_check_vat" class="clearfix"/>
867                   <div t-attf-class="form-group #{error.get('street2') and 'has-error' or ''} col-lg-6">
868                       <label class="control-label" for="street2" style="font-weight: normal">Company Name</label>
869                       <input type="text" name="street2" class="form-control" t-att-value="checkout.get('street2')"/>
870                   </div>
871                   <div t-if="has_check_vat" t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
872                       <label class="control-label" for="vat" style="font-weight: normal">VAT Number</label>
873                       <input type="text" name="vat" class="form-control" t-att-value="checkout.get('vat')"/>
874                   </div>
875                   <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
876                       <label class="control-label" for="contact_name">Email</label>
877                       <input type="email" name="email" class="form-control" t-att-value="checkout.get('email')"/>
878                   </div>
879                   <div t-attf-class="form-group #{error.get('phone') and 'has-error' or ''} col-lg-6">
880                       <label class="control-label" for="phone">Phone</label>
881                       <input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone')"/>
882                   </div>
883
884                   <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''} col-lg-6">
885                       <label class="control-label" for="street">Street</label>
886                       <input type="text" name="street" class="form-control" t-att-value="checkout.get('street')"/>
887                   </div>
888                   <div class="clearfix"/>
889
890                   <div t-attf-class="form-group #{error.get('city') and 'has-error' or ''} col-lg-6">
891                       <label class="control-label" for="city">City</label>
892                       <input type="text" name="city" class="form-control" t-att-value="checkout.get('city')"/>
893                   </div>
894                   <div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''} col-lg-6">
895                       <label class="control-label" for="zip">Zip / Postal Code</label>
896                       <input type="text" name="zip" class="form-control" t-att-value="checkout.get('zip')"/>
897                   </div>
898                   <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''} col-lg-6">
899                       <label class="control-label" for="country_id">Country</label>
900                       <select name="country_id" class="form-control">
901                           <option value="">Country...</option>
902                           <t t-foreach="countries or []" t-as="country">
903                               <option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')"><t t-esc="country.name"/></option>
904                           </t>
905                       </select>
906                   </div>
907                   <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">
908                       <label class="control-label" for="state_id" style="font-weight: normal">State / Province</label>
909                       <select name="state_id" class="form-control">
910                           <option value="">select...</option>
911                           <t t-foreach="states or []" t-as="state">
912                               <option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
913                           </t>
914                       </select>
915                   </div>
916
917                   <div class="clearfix"/>
918
919                   <div class="form-group col-lg-12">
920                       <label>Shipping</label>
921                       <select name="shipping_id" class="form-control">
922                           <option value="0">Ship to the same address</option>
923                           <t t-foreach="shippings" t-as="shipping">
924                               <option t-att-value="shipping.id" t-att-selected="shipping.id == shipping_id"
925                                 t-att-data-shipping_name="shipping.name"
926                                 t-att-data-shipping_phone="shipping.phone"
927                                 t-att-data-shipping_street="shipping.street"
928                                 t-att-data-shipping_city="shipping.city"
929                                 t-att-data-shipping_zip="shipping.zip"
930                                 t-att-data-shipping_state_id="shipping.state_id and shipping.state_id.id"
931                                 t-att-data-shipping_country_id="shipping.country_id and shipping.country_id.id"
932                                 ><t t-esc="', '.join('\n'.join(shipping.name_get()[0][1].split(',')).split('\n')[1:])"/></option>
933                           </t>
934                           <option value="-1">-- Create a new address --</option>
935                       </select>
936                   </div>
937               </div>
938               <div class="js_shipping row mb16" t-att-style="not shipping_id and 'display:none' or ''">
939                   <h3 class="oe_shipping col-lg-12 mt16">Shipping Information</h3>
940
941                   <div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''} col-lg-6">
942                       <label class="control-label" for="shipping_name">Name (Shipping)</label>
943                       <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')" t-att-readonly="'readonly' if shipping_id &gt;= 0 else ''"/>
944                   </div>
945                   <div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''} col-lg-6">
946                       <label class="control-label" for="shipping_phone">Phone</label>
947                       <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')" t-att-readonly="  'readonly' if shipping_id &gt;= 0 else ''"/>
948                   </div>
949                   <div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''} col-lg-6">
950                       <label class="control-label" for="shipping_street">Street</label>
951                       <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
952                   </div>
953                   <div class="clearfix"/>
954                   <div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''} col-lg-6">
955                       <label class="control-label" for="shipping_city">City</label>
956                       <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
957                   </div>
958                   <div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''} col-lg-6">
959                       <label class="control-label" for="shipping_zip">Zip / Postal Code</label>
960                       <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
961                   </div>
962                   <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
963                       <label class="control-label" for="shipping_state_id" style="font-weight: normal">State / Province</label>
964                       <select name="shipping_state_id" class="form-control" t-att-readonly="  'readonly' if shipping_id &gt;= 0 else ''">
965                           <option value="">State / Province...</option>
966                           <t t-foreach="states or []" t-as="state">
967                               <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
968                           </t>
969                       </select>
970                   </div>
971                   <div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''} col-lg-6">
972                       <label class="control-label" for="shipping_country_id">Country</label>
973                       <select name="shipping_country_id" class="form-control" t-att-readonly="  'readonly' if shipping_id &gt;= 0 else ''">
974                           <option value="">Country...</option>
975                           <t t-foreach="countries or []" t-as="country">
976                               <option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
977                           </t>
978                       </select>
979                   </div>
980                   <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
981                       <label class="control-label" for="shipping_state_id" style="font-weight: normal">State / Province</label>
982                       <select name="shipping_state_id" class="form-control">
983                           <option value="">State / Province...</option>
984                           <t t-foreach="states or []" t-as="state">
985                               <option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
986                           </t>
987                       </select>
988                   </div>
989               </div>
990               <div class="clearfix">
991                 <a href="/shop/cart" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Return to Cart</a>
992                 <a class="btn btn-default btn-primary pull-right mb32 a-submit">Confirm <span class="fa fa-long-arrow-right"/></a>
993               </div>
994           </div>
995           <div class="col-lg-offset-1 col-lg-3 col-md-3 text-muted">
996               <h3 class="page-header mt16">Your Order <small><a href="/shop/cart"><span class="fa fa-arrow-right"/> change</a></small></h3>
997               <t t-set="website_sale_order" t-value="website.sale_get_order()"/>
998               <div class="row">
999                   <div class="col-sm-6 text-right">Subtotal: </div>
1000                   <div class="col-sm-6"><span style="white-space: nowrap;" t-field="website_sale_order.amount_untaxed" t-field-options='{
1001                       "widget": "monetary",
1002                       "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1003                   }'/></div>
1004                   <div class="col-sm-6 text-right">Taxes: </div>
1005                   <div class="col-sm-6"><span style="white-space: nowrap;" t-field="website_sale_order.amount_tax" t-field-options='{
1006                       "widget": "monetary",
1007                       "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1008                   }'/></div>
1009                   <div class="col-sm-6 text-right"><h4>Total To Pay: </h4></div>
1010                   <div class="col-sm-6"><h4><span style="white-space: nowrap;" t-field="website_sale_order.amount_total" t-field-options='{
1011                       "widget": "monetary",
1012                       "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1013                   }'/></h4></div>
1014               </div>
1015           </div>
1016       </div>
1017       </form>
1018     </div>
1019     </div>
1020   </t>
1021 </template>
1022
1023 <!-- /shop/payment -->
1024
1025 <template id="payment">
1026   <t t-call="website.layout">
1027           <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
1028       <t t-set="additional_title">Shop - Select Payment Mode</t>
1029       <div id="wrap">
1030         <div class="container oe_website_sale">
1031
1032           <ul class="wizard pull-right">
1033               <li><a href="/shop/cart" class="text-success">Review Order<span class="chevron"></span></a></li>
1034               <li><a href="/shop/checkout" class="text-success">Shipping &amp; Billing<span class="chevron"></span></a></li>
1035               <li class="text-primary">Payment<span class="chevron"></span></li>
1036               <li class="text-muted">Confirmation<span class="chevron"></span></li>
1037           </ul>
1038           <h1 class="mb32">Validate Order</h1>
1039           <div class="row">
1040           <div class="col-lg-8 col-sm-9 oe_cart">
1041               <t t-set="website_sale_order" t-value="website.sale_get_order()"/>
1042               <table class='table table-striped table-condensed' id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
1043                   <thead>
1044                       <tr>
1045                           <th colspan="2" width="80">Product</th>
1046                           <th width="100">Price</th>
1047                           <th width="120">Quantity</th>
1048                       </tr>
1049                   </thead>
1050                   <tbody>
1051                       <tr t-foreach="website_sale_order.website_order_line" t-as="line">
1052                           <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
1053                           <td t-if="line.product_id.product_tmpl_id">
1054                               <a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
1055                                   <span t-field="line.product_id.image_small"
1056                                         t-field-options='{"widget": "image", "class": "img-rounded"}'/>
1057                               </a>
1058                           </td>
1059                           <td t-if="line.product_id.product_tmpl_id">
1060                              <strong t-field="line.product_id.name"/>
1061                           </td>
1062                           <td class="text-center">
1063                              <span t-field="line.price_unit" style="white-space: nowrap;" t-field-options='{
1064                                  "widget": "monetary",
1065                                  "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1066                              }'/>
1067                           </td>
1068                           <td>
1069                              <div t-esc="line.product_uom_qty"/>
1070                           </td>
1071                       </tr>
1072                   </tbody>
1073               </table>
1074               <t t-call="website_sale.total"/>
1075               <div class="clearfix"/>
1076               <div class="oe_structure"/>
1077             </div>
1078             <div class="col-lg-3 col-lg-offset-1 col-sm-3 text-muted" id="right_column">
1079                 <h4>Bill To:</h4>
1080                 <div t-field="order.partner_invoice_id" t-field-options='{
1081                     "widget": "contact",
1082                     "fields": ["address", "name", "phone", "email"]
1083                     }'/>
1084                 <div>
1085                   <a href="/shop/checkout"><span class="fa fa-arrow-right"/> Change Address</a>
1086                 </div>
1087                 <t>
1088                     <h4 class="mt32">Ship To:</h4>
1089                     <t t-if="website_sale_order.partner_shipping_id and website_sale_order.partner_shipping_id.id != website_sale_order.partner_invoice_id.id">
1090                       <div t-field="order.partner_shipping_id" t-field-options='{
1091                         "widget": "contact",
1092                         "fields": ["address", "name", "phone"]
1093                         }'/>
1094                     </t>
1095                     <address t-if="website_sale_order.partner_shipping_id.id == website_sale_order.partner_invoice_id.id">Ship to the same address</address>
1096                     <div class="mb32">
1097                       <a href="/shop/checkout"><span class="fa fa-arrow-right"/> Change Address</a>
1098                     </div>
1099                 </t>
1100             </div>
1101           </div>
1102
1103           <div class="js_payment mb64 row" t-if="acquirers and website_sale_order.amount_total" id="payment_method">
1104               <div class="col-lg-5 col-sm-6">
1105                   <h4>Payment Method:</h4>
1106                   <ul class="list-unstyled">
1107                     <li t-foreach="acquirers or []" t-as="acquirer">
1108                       <label t-if="acquirer.button">
1109                           <input t-att-value="acquirer.id" type="radio" name="acquirer" t-att-checked="acquirers[0] == acquirer"/>
1110                           <img class="media-object" style="width: 60px; display: inline-block;"
1111                               t-att-title="acquirer.name"
1112                               t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.provider, acquirer.provider)"/>
1113                               <span t-field="acquirer.name"/>
1114                       </label>
1115                     </li>
1116                   </ul>
1117               </div>
1118               <div class="col-lg-3 col-sm-3">
1119                   <t t-foreach="acquirers or []" t-as="acquirer">
1120                       <div t-att-data-id="acquirer.id" class="oe_sale_acquirer_button hidden pull-right">
1121                         <div t-raw="acquirer.button"/>
1122                         <div t-field="acquirer.pre_msg"/>
1123                       </div>
1124                   </t>
1125               </div>
1126           </div>
1127           <div class="js_payment mb64 row" t-if="not website_sale_order.amount_total" id="payment_method">
1128             <div class="col-lg-8 col-sm-8">
1129               <form target="_self" action="/shop/payment/validate" method="post" class="pull-right">
1130                   <a style="width:100px;" class="btn btn-primary a-submit">
1131                     <span>Pay Now <span class="fa fa-long-arrow-right"></span></span>
1132                   </a>
1133               </form>
1134             </div>
1135           </div>
1136
1137         </div>
1138         <div class="oe_structure"/>
1139       </div>
1140
1141   </t>
1142 </template>
1143
1144 <template id="confirmation">
1145   <t t-call="website.layout">
1146           <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
1147       <t t-set="additional_title">Shop - Confirmed</t>
1148       <div id="wrap">
1149         <div class="container oe_website_sale">
1150
1151           <ul class="wizard pull-right">
1152               <li class="text-muted">Review Order<span class="chevron"></span></li>
1153               <li class="text-muted">Shipping &amp; Billing<span class="chevron"></span></li>
1154               <li class="text-muted">Payment<span class="chevron"></span></li>
1155               <li class="text-primary">Confirmation<span class="chevron"></span></li>
1156           </ul>
1157           <h1 class="mb32">Order <em t-field="order.name"/> Confirmed</h1>
1158           <div class="row">
1159               <div class="col-md-8 oe_cart">
1160                   <h2>Thank you for your order.</h2>
1161                   <div class="oe_website_sale_tx_status" t-att-data-order-id="order.id">
1162                   </div>
1163                   <div class="clearfix"/>
1164                   <div class="oe_structure"/>
1165               </div>
1166               <div class="col-md-3 col-md-offset-1 text-muted" id="right_column">
1167                 <h4>Bill To:</h4>
1168                 <div t-field="order.partner_invoice_id" t-field-options='{
1169                     "widget": "contact",
1170                     "fields": ["address", "name", "phone", "email"]
1171                     }'/>
1172                 <t>
1173                     <h4 class="mt32">Ship To:</h4>
1174                     <t t-if="order.partner_shipping_id and order.partner_shipping_id.id != order.partner_invoice_id.id">
1175                       <div t-field="order.partner_shipping_id" t-field-options='{
1176                         "widget": "contact",
1177                         "fields": ["address", "name", "phone"]
1178                         }'/>
1179                     </t>
1180                     <address t-if="order.partner_shipping_id.id == order.partner_invoice_id.id">Ship to the same address</address>
1181                 </t>
1182               </div>
1183           </div>
1184
1185         </div>
1186         <div class="oe_structure"/>
1187       </div>
1188
1189   </t>
1190 </template>
1191
1192 <!-- Page Shop my cart and payment total -->
1193
1194 <template id="total">
1195     <table class='pull-right mb16' id="cart_total" t-if="website_sale_order">
1196         <thead>
1197             <tr width="100" style="border-top: 1px solid #000" id="order_total">
1198                 <th><h3>Total: </h3></th>
1199                 <th class="text-right">
1200                   <h3><span t-field="website_sale_order.amount_total" style="white-space: nowrap;" t-field-options='{
1201                       "widget": "monetary",
1202                       "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1203                     }'/></h3>
1204                 </th>
1205             </tr>
1206             <tr width="120" class="text-muted" id="order_total_taxes">
1207                 <td><abbr title="Taxes may be updated after providing shipping address">Taxes:</abbr></td>
1208                 <td class="text-right">
1209                     <span t-field="website_sale_order.amount_tax" style="white-space: nowrap;" t-field-options='{
1210                         "widget": "monetary",
1211                         "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
1212                     }'/>
1213                 </td>
1214             </tr>
1215         </thead>
1216     </table>
1217 </template>
1218
1219 <!-- User Navbar -->
1220 <template id="content_new_product" inherit_id="website.user_navbar" groups="base.group_sale_manager">
1221     <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
1222         <li><a id="create-new-product" href="#" data-action="new_product">New Product</a></li>
1223     </xpath>
1224 </template>
1225
1226 </data>
1227 </openerp>