1 <?xml version="1.0" encoding="utf-8"?>
5 <record model="ir.ui.view" id="product_pricelist_view">
6 <field name="name">product.pricelist.website.form</field>
7 <field name="model">product.pricelist</field>
8 <field name="inherit_id" ref="product.product_pricelist_view"/>
9 <field name="arch" type="xml">
10 <field name="active" position="after">
16 <!-- Layout add nav and footer -->
18 <template id="footer_custom" inherit_id="website.layout" name="Custom Footer">
19 <xpath expr="//body/header//ul[@id='top_menu']/li" position="before">
20 <li><a href="/shop/">Shop</a></li>
22 <a href="/shop/mycart/">
23 <i class="icon-shopping-cart"></i>
25 <t t-if="order and order.get_total_quantity()">
26 <span class="badge" t-esc="order.get_total_quantity()"/>
33 <record id="product_normal_form_view" model="ir.ui.view">
34 <field name="name">product.normal.form.inherit</field>
35 <field name="model">product.product</field>
36 <field name="inherit_id" ref="product.product_normal_form_view"/>
37 <field name="arch" type="xml">
38 <group name="sale" position="inside">
39 <group name="website" string="Website">
40 <field name="website_published"/>
41 <field name="suggested_product_ids" widget="many2many_tags"/>
49 <template id="layout" name="Products Layout">
50 <t t-call="website.layout">
52 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
53 <t t-raw="head or ''"/>
55 <t t-set="title">Shop - <t t-raw="title">Categories</t></t>
56 <div class="container oe_website_sale">
58 <div class="col-md-12" id="shop_content">
59 <t t-raw="shop_content" />
65 <template id="products_categories" inherit_id="website_sale.layout" inherit_option_id="website_sale.layout" name="Left Product Categories">
66 <xpath expr="//div[@id='shop_content']" position="before">
67 <div class="col-md-4">
68 <ul class="nav nav-pills nav-stacked">
69 <li t-att-class=" '' if category_id else 'active' " class='active'><a href="/shop/">All Products</a></li>
70 <t t-foreach="categories" t-as="category">
71 <t t-call="website_sale.categories_recursive"/>
76 <xpath expr="//div[@id='shop_content']" position="attributes">
77 <attribute name="class">col-md-8</attribute>
81 <!-- List of categories -->
83 <template id="categories_recursive">
84 <li t-att-class="category.id == category_id and 'active' or ''">
85 <a t-attf-href="/shop/category/#{ category.id }/" t-field="category.name"></a>
86 <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
87 <t t-foreach="category.child_id" t-as="category">
88 <t t-call="website_sale.categories_recursive"/>
96 <template id="products" page="True">
97 <t t-call="website_sale.layout">
99 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
100 <t t-raw="head or ''"/>
102 <t t-set="title">Product</t>
103 <t t-set="shop_content">
104 <t t-call="website.pager">
105 <t t-set="classname">pull-left</t>
107 <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right pagination">
108 <input type="text" name="search" class="search-query col-md-2 form-control" placeholder="Search" t-att-value="search or '' or ''"/>
110 <div class="clearfix"/>
111 <div class='row grid grid-align-top'>
112 <t t-foreach="products" t-as="product">
113 <div t-attf-class="css_product col-md-2 mb16 thumbnail text-center #{not product.website_published and 'disabled' or ''}">
114 <t t-call="website.publish"><t t-set="object" t-value="product"/></t>
115 <div class="ellipsis css_content">
116 <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&category_id=%s' % category_id) or ''}">
117 <h5 t-field="product.name"> </h5>
118 <img class="img-rounded" t-att-src="product.img('image_small')"/>
120 <small t-field="product.description_sale"></small>
121 <span class="end">&#133;</span><span class="fill"></span>
124 <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
125 <small class="text-error" style="text-decoration: line-through;"><t t-esc="product.product_variant_ids[0].lst_price" /> €</small>
127 <b><t t-esc="product.product_variant_ids[0].price" /> €</b>
129 <div class="mb8 mt8">
130 <a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to basket</a>
135 <div class="text-center">
136 <t t-call="website.pager" />
144 <template id="product" name="Product">
145 <t t-call="website_sale.layout">
146 <t t-set="title">Product</t>
147 <t t-set="shop_content">
149 <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right">
150 <input type="text" name="search" class="search-query col-md-2 form-control" placeholder="Search..." t-att-value="search or '' or ''"/>
152 <div class="clearfix"/>
153 <div id="product_detail">
154 <t t-call="website.publish"><t t-set="object" t-value="product"/></t>
155 <h1 t-field="product.name"></h1>
156 <a t-if="len(product.product_variant_ids) <= 1" t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success pull-right">Add to basket</a>
157 <form t-if="len(product.product_variant_ids) > 1" action="./add_cart/" class="pull-right">
158 <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="product">
159 <input type="radio" name="product_id" t-att-value="product.id" t-att-checked="product == product.product_variant_ids[0] or None"/>
160 <t t-esc="product.variants or ''">Standard</t>
161 <span class="badge" t-if="product.price_extra"><t t-esc="product.price_extra > 0 and '+' or ''"/><t t-esc="product.price_extra"/> €</span>
163 <button class="btn btn-sm btn-success">Add to basket</button>
165 <img class="media-object img-responsive" t-att-src="product.img('image_medium')"/>
166 <h2 t-if="editable">Description for Quotations</h2>
167 <div t-if="editable" t-field="product.description_sale"><br/></div>
168 <h2 t-if="editable">Description</h2>
169 <div t-field="product.website_description"><br/></div>
171 <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
172 <h5 class="text-error" style="text-decoration: line-through;"><t t-esc="product.product_variant_ids[0].lst_price" /> €</h5>
174 <h4><t t-esc="product.product_variant_ids[0].price" /> €</h4>
180 <template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Recommended Products">
181 <xpath expr="//div[@id='product_detail']" position="inside">
182 <div class="well mt32" t-if="product.recommended_products()">
183 <h4>Customers who have bought this item also bought</h4>
184 <div class='row mt16' style="margin-left: 15px !important;">
185 <t t-foreach="product.recommended_products()" t-as="product">
186 <div class='col-md-2 thumbnail' style='width: 170px; margin-right: 16px;'>
187 <a t-attf-href="/shop/product/#{ product.id }/">
188 <div class='mt16 text-center'>
189 <img t-att-src="product.img('image_small')"/>
190 <h5 t-field='product.name'></h5>
200 <!-- Page Shop my cart -->
202 <template id="mycart" name="My cart" page="True">
203 <t t-call="website_sale.layout">
204 <t t-set="title">My cart</t>
205 <t t-set="shop_content">
206 <div class="col-md-12 oe_mycart">
207 <h1>My Shopping Cart</h1>
208 <table class='table' id="mycart_products">
217 <th colspan="2">Product</th>
222 <tbody t-if="not order or not order.order_line">
223 <tr><td colspan="4"><h3>Your cart is empty</h3></td></tr>
225 <tbody t-if="order and order.order_line">
226 <t t-foreach="order.order_line" t-as="line">
228 <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
229 <td t-if="line.product_id.product_tmpl_id">
230 <a t-attf-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><img class="img-rounded" t-att-src="line.product_id.img('image_small')"/></a>
232 <td t-if="line.product_id.product_tmpl_id">
233 <a t-attf-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><span t-field="line.name"/></a><br/>
234 <small t-field="line.product_id.description_sale"/>
237 <t t-if="line.product_id.product_tmpl_id and line.product_id.lst_price != line.price_unit">
238 <small class="text-error" style="text-decoration: line-through;"><t t-esc="line.product_id.lst_price" /> €</small>
240 <span t-field="line.price_unit"></span> €
243 <div class="pull-right">
244 <input type="text" class="js_quantity input-sm col-md-5" t-att-data-id="line.id" t-att-value="line.product_uom_qty"/>
245 <a t-attf-href="./remove_cart/?order_line_id=#{ line.id }" class="btn btn-default mb8 btn-sm btn-inverse">-</a>
246 <a t-attf-href="./add_cart/?order_line_id=#{ line.id }" class="btn btn-default mb8 btn-sm btn-success">+</a>
253 <table class='table table-hover table-condensed' id="mycart_total">
261 <tr> <th colspan="3">Subtotal </th> <th><t t-esc="order and order.amount_untaxed or 0"/> €</th></tr>
262 <tr> <th colspan="3">Taxes </th> <th><t t-esc="order and order.amount_tax or 0"/> €</th></tr>
263 <tr> <th colspan="3"><h4>Total</h4></th> <th><h4><t t-esc="order and order.amount_total or 0"/> €</h4></th></tr>
266 <a t-if="order and order.order_line" href="/shop/checkout/" class="btn btn-success">Proceed To Payment</a>
271 <template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in list view">
272 <xpath expr="//table[@id='mycart_products']" position="after">
273 <table t-if="suggested_products" class='table table-hover table-condensed'>
281 <th>Suggested products</th>
285 <t t-foreach="suggested_products" t-as="product">
288 <a t-attf-href="/shop/product/#{ product.id }/"><span t-field="product.name"/></a><br/>
289 <small t-field="product.description_sale"/>
292 <span t-field="product.list_price"></span>€
295 <div class="pull-right">
296 <a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-sm btn-success">+</a>
305 <template id="suggested_products_cell" inherit_option_id="website_sale.mycart" name="Suggested Products in card view">
306 <xpath expr="//table[@id='mycart_products']" position="after">
307 <div class="mt16 mb32" t-if="suggested_products">
308 <h4>Suggested products</h4>
309 <div class='row mt16'>
310 <t t-foreach="suggested_products" t-as="product">
311 <div class='col-md-2 thumbnail'>
312 <a t-attf-href="/shop/product/#{ product.id }/">
313 <div class='mt16 text-center'>
314 <img t-att-src="product.img('image_small')"/>
315 <h5 t-field='product.name'></h5>
324 <template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code">
325 <xpath expr="//table[@id='mycart_total']" position="after">
326 <form t-if="order and order.order_line" class="well" action="/shop/mycart/" method="post">
327 <input name="promo" class='input' type="text" placeholder="Reduction Code..." t-att-value="order.pricelist_id.code or ''"/>
328 <button class="btn">Apply Code</button>
334 <!-- Page confirm my cart -->
336 <template id="checkout">
337 <t t-call="website.layout">
339 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
340 <t t-raw="head or ''"/>
342 <t t-set="title">Shop - Checkout</t>
343 <div class="container oe_website_sale">
345 <div class="col-md-4">
346 <table class="table table-condensed">
354 <tbody t-if="order.order_line">
355 <t t-foreach="order.order_line" t-as="line">
357 <td><t t-esc="line.name"/></td>
358 <td><t t-esc="line.product_uom_qty"/></td>
359 <td><t t-esc="line.price_unit"/> €</td>
364 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="order.amount_untaxed"/> €</td></tr>
365 <tr><th>Taxes</th><td></td><td><t t-esc="order.amount_tax"/> €</td></tr>
366 <tr><th>Total</th><td></td><td><t t-esc="order.amount_total"/> €</td></tr>
370 <form class="col-md-8 form-horizontal" action="/shop/confirm_order/" method="post">
372 <a t-if="not partner" t-attf-href="/admin#action=redirect&url=#{ host_url }/shop/checkout/" class="btn btn-primary">Log me, I have an account</a>
373 <h3 class="col-md-10">Billing Information</h3>
374 <div t-attf-class="form-group #{error.get('name', '')}">
375 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
376 <div class="col-lg-4">
377 <input type="text" name="name" class="form-control" t-att-value="checkout.get('name', '')"/>
380 <div t-attf-class="form-group #{error.get('phone', '')}">
381 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
382 <div class="col-lg-4">
383 <input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone', '')"/>
386 <div t-attf-class="form-group #{error.get('fax', '')}">
387 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
388 <div class="col-lg-4">
389 <input type="tel" name="fax" class="form-control" t-att-value="checkout.get('fax', '')"/>
392 <div t-attf-class="form-group #{error.get('company', '')}">
393 <label class="col-lg-3 control-label" for="contact_name">Company</label>
394 <div class="col-lg-4">
395 <input type="text" name="company" class="form-control" t-att-value="checkout.get('company', '')"/>
398 <div t-attf-class="form-group #{error.get('email', '')}">
399 <label class="col-lg-3 control-label" for="contact_name">Email address</label>
400 <div class="col-lg-4">
401 <input type="email" name="email" class="form-control" t-att-value="checkout.get('email', '')"/>
404 <div t-attf-class="form-group #{error.get('street', '')}">
405 <label class="col-lg-3 control-label" for="contact_name">Street</label>
406 <div class="col-lg-4">
407 <input type="text" name="street" class="form-control" t-att-value="checkout.get('street', '')"/>
410 <div t-attf-class="form-group #{error.get('city', '')}">
411 <label class="col-lg-3 control-label" for="contact_name">City</label>
412 <div class="col-lg-4">
413 <input type="text" name="city" class="form-control" t-att-value="checkout.get('city', '')"/>
416 <div t-attf-class="form-group #{error.get('state_id', '')}">
417 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
418 <div class="col-lg-4">
419 <select name="state_id" class="form-control">
420 <option value="">State / Province...</option>
421 <t t-foreach="states or []" t-as="state">
422 <option t-att-value="state.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
427 <div t-attf-class="form-group #{error.get('zip', '')}">
428 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
429 <div class="col-lg-4">
430 <input type="text" name="zip" class="form-control" t-att-value="checkout.get('zip', '')"/>
433 <div t-attf-class="form-group #{error.get('country_id', '')}">
434 <label class="col-lg-3 control-label" for="contact_name">Country</label>
435 <div class="col-lg-4">
436 <select name="country_id" class="form-control">
437 <option value="">Country...</option>
438 <t t-foreach="countries or []" t-as="country">
439 <option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')"><t t-esc="country.name"/></option>
444 <div class="form-group checkbox">
445 <div class="col-lg-7 col-md-offset-3">
447 <input t-if="not shipping" type="checkbox" name="shipping_different"/>
448 <input t-if="shipping" type="checkbox" name="shipping_different" checked="1"/>
449 Ship to different address
454 <div class="js_shipping row" t-att-style="not shipping and 'display:none' or ''">
455 <h3 class="col-md-12 oe_shipping">Shipping Information</h3>
456 <div t-attf-class="form-group #{error.get('shipping_name', '')}">
457 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
458 <div class="col-lg-4">
459 <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')"/>
462 <div t-attf-class="form-group #{error.get('shipping_phone', '')}">
463 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
464 <div class="col-lg-4">
465 <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')"/>
468 <div t-attf-class="form-group #{error.get('shipping_fax', '')}">
469 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
470 <div class="col-lg-4">
471 <input type="tel" name="shipping_fax" class="form-control" t-att-value="checkout.get('shipping_fax', '')"/>
474 <div t-attf-class="form-group #{error.get('shipping_street', '')}">
475 <label class="col-lg-3 control-label" for="contact_name">Street</label>
476 <div class="col-lg-4">
477 <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')"/>
480 <div t-attf-class="form-group #{error.get('shipping_city', '')}">
481 <label class="col-lg-3 control-label" for="contact_name">City</label>
482 <div class="col-lg-4">
483 <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')"/>
486 <div t-attf-class="form-group #{error.get('shipping_state_id', '')}">
487 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
488 <div class="col-lg-4">
489 <select name="shipping_state_id" class="form-control">
490 <option value="">State / Province...</option>
491 <t t-foreach="states or []" t-as="state">
492 <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
497 <div t-attf-class="form-group #{error.get('shipping_zip', '')}">
498 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
499 <div class="col-lg-4">
500 <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')"/>
503 <div t-attf-class="form-group #{error.get('shipping_country_id', '')}">
504 <label class="col-lg-3 control-label" for="contact_name">Country</label>
505 <div class="col-lg-4">
506 <select name="shipping_country_id" class="form-control">
507 <option value="">Country...</option>
508 <t t-foreach="countries or []" t-as="country">
509 <option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
515 <button type="submit" class="btn btn-default">Last stape</button>
522 <template id="payment">
523 <t t-call="website.layout">
525 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
526 <t t-raw="head or ''"/>
528 <t t-set="title">Shop - Payment</t>
529 <div class="container oe_website_sale">
531 <div class="col-md-4">
532 <table class="table table-condensed" t-if="order">
540 <tbody t-if="order.order_line">
541 <t t-foreach="order.order_line" t-as="line">
543 <td><t t-esc="line.name"/></td>
544 <td><t t-esc="line.product_uom_qty"/></td>
545 <td><t t-esc="line.price_unit"/> €</td>
550 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="order.amount_untaxed"/> €</td></tr>
551 <tr><th>Taxes</th><td></td><td><t t-esc="order.amount_tax"/> €</td></tr>
552 <tr><th>Total</th><td></td><td><t t-esc="order.amount_total"/> €</td></tr>
556 <div class="col-md-8">
557 <div class="js_payment row">
558 <h3 class="col-md-12">Click on your payment method</h3>
559 <div class="col-md-2">
560 <t t-foreach="payments or []" t-as="payment">
562 <input t-att-value="payment.id" type="radio" name="payment_type"/> <t t-esc="payment.name"/>
566 <t t-foreach="payments or []" t-as="payment">
567 <div t-att-data-id="payment.id" t-raw="payment._content" class="hidden col-md-6"/>
569 <a href="/shop/payment_validate/" class="hidden btn btn-default">I validate my payment</a>