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