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