2013-06-28 16:28:04 +00:00
<?xml version="1.0" encoding="utf-8"?>
<openerp >
2013-07-23 08:18:13 +00:00
<data >
2013-07-23 13:39:23 +00:00
2013-07-23 08:18:13 +00:00
<!-- Layout add nav and footer -->
<record id= "header_ecommerce" model= "ir.ui.view" >
<field name= "name" > header_ecommerce</field>
<field name= "inherit_id" ref= "website.header" />
<field name= "arch" type= "xml" >
<data >
<xpath expr= "(//li)[last()]" position= "after" >
2013-07-24 09:42:18 +00:00
<li class= "pull-right" > <a href= "/shop/mycart" > <i class= "icon-shopping-cart icon-large" style= "position: absolute;" > </i> & nbsp; & nbsp; & nbsp; My cart</a> </li>
2013-07-23 08:18:13 +00:00
<li class= "pull-right" > <a href= "/shop" > Shop</a> </li>
</xpath>
</data>
</field>
</record>
2013-06-28 16:28:04 +00:00
2013-07-23 08:18:13 +00:00
<!-- Page Shop -->
2013-06-28 16:28:04 +00:00
2013-07-23 08:18:13 +00:00
<template id= "page" >
<t t-call= "website.layout" >
2013-07-23 15:16:07 +00:00
<t t-set= "head" >
<script type= "text/javascript" src= "/website_sale/static/src/js/ecommerce.js" > </script>
<link rel= 'stylesheet' href= '/website_sale/static/src/css/ecommerce.css' />
<t t-raw= "head" />
</t>
2013-07-23 08:18:13 +00:00
<t t-set= "title" > Shop - <t t-raw= "title" > Categories</t> </t>
2013-07-30 18:24:33 +00:00
<div class= "container mt48 oe_ecommerce" >
2013-07-23 08:18:13 +00:00
<div class= "row" >
2013-07-24 10:26:54 +00:00
<div class= "span4 css_noprint" >
2013-07-23 08:18:13 +00:00
<ul class= "nav nav-list" >
<t t-foreach= "categories" t-as= "category" >
2013-07-02 15:21:41 +00:00
<t t-call= "website_sale.categories_recursive" />
2013-07-01 09:58:43 +00:00
</t>
2013-07-23 08:18:13 +00:00
</ul>
</div>
<div class= "span8" >
<t t-raw= "shop_content" >
</t>
2013-07-02 21:01:04 +00:00
</div>
</div>
2013-07-23 08:18:13 +00:00
</div>
</t>
</template>
2013-07-11 14:24:34 +00:00
2013-07-23 08:18:13 +00:00
<!-- List of categories -->
<template id= "categories_recursive" >
<li t-att-class= "category.id == current_category and 'active' or ''" >
<a t-att-href= "'/shop/category/%%s' %% category.id" > <span t-record= "category" t-field= "name" > <t t-esc= "category.name" /> </span> </a>
<ul t-if= "category.child_id" class= "nav nav-list" >
<t t-foreach= "category.child_id" t-as= "category" >
<t t-call= "website_sale.categories_recursive" />
2013-07-02 09:41:38 +00:00
</t>
2013-07-23 08:18:13 +00:00
</ul>
</li>
</template>
<!-- Product list -->
<template id= "products" >
<t t-call= "website_sale.page" >
<t t-set= "title" > Product</t>
<t t-set= "shop_content" >
2013-07-30 18:24:33 +00:00
<div class= "oe_search clearfix" >
<form action= "/shop" method= "get" class= "navbar-search pull-right" >
2013-07-23 15:16:07 +00:00
<input type= "text" name= "search" class= "search-query span4" placeholder= "Search" t-att-value= "search or '' or ''" />
2013-07-23 08:18:13 +00:00
<button type= "submit" class= "btn" > Submit</button>
</form>
</div>
<span class= "oe_products" >
<t t-foreach= "products" t-as= "product" >
<t t-set= "quantity" t-value= "([int(line.product_uom_qty) for line in (order.order_line or []) if line.product_id.id == product.id] + [0])[0]" />
<t t-call= "website_sale.product_card" />
2013-07-02 09:41:38 +00:00
</t>
2013-07-23 08:18:13 +00:00
</span>
</t>
</t>
</template>
<template id= "product_card" >
2013-07-30 18:24:33 +00:00
<div class= "media oe_product span3" >
2013-07-23 08:18:13 +00:00
<a t-att-href= "'/shop/product/%%s' %% product.id" > <h4 class= "media-heading" > <span t-record= "product" t-field= "name" > <t t-esc= "product.name" /> </span> </h4> </a>
<a class= "pull-left" t-att-href= "'/shop/product/%%s' %% product.id" > <img class= "media-object" t-att-src= "'data:image/png;base64,' + product.image" /> </a>
<div class= "media-body" >
<div class= "oe_ecommerce_description" t-record= "product" t-field= "description_sale" > <t t-esc= "product.description_sale" /> </div>
<div class= "oe_ecommerce_price" > <span > <span t-record= "product" t-field= "list_price" > <t t-esc= "product.list_price" /> </span> €</span> </div>
<div class= "oe_button_cart" >
2013-07-30 18:24:33 +00:00
<button t-att-class= "'btn btn-small btn-inverse %%s' %% (not quantity and 'oe_hidden' or '')" t-att-data-id= "product.id" > Remove one</button>
<button t-att-class= "'btn btn-small %%s' %% (quantity and 'btn-success' or 'btn-primary')" t-att-data-id= "product.id" > Add to cart
2013-07-23 08:18:13 +00:00
<span class= "oe_txt" > (<span class= "oe_quantity" > <t t-esc= "quantity" /> </span> )</span>
</button>
</div>
</div>
</div>
</template>
2013-06-28 16:28:04 +00:00
2013-07-23 08:18:13 +00:00
<template id= "product_recommended" >
<div class= "oe_recommended media well well-small" t-if= "recommended_products" >
<h6 > Other customers have also take this products:</h6>
<t t-foreach= "recommended_products or []" t-as= "product" >
<a t-att-href= "'/shop/product/%%s' %% product.id" > <img t-att-src= "'data:image/png;base64,' + product.image" /> </a>
</t>
</div>
</template>
2013-07-02 12:06:25 +00:00
2013-07-23 08:18:13 +00:00
<!-- product -->
<template id= "product" >
<t t-call= "website_sale.page" >
<t t-set= "title" > Product</t>
<t t-set= "shop_content" >
<div class= "oe_product_detail" >
<h1 > <span t-record= "product" t-field= "name" > <t t-esc= "product.name" /> </span> </h1>
<div class= "oe_button_cart" >
<button t-att-class= "'btn btn-inverse %%s' %% (not quantity and 'oe_hidden' or '')" t-att-data-id= "product.id" > Remove one</button>
<button t-att-class= "'btn %%s' %% (quantity and 'btn-success' or 'btn-primary')" t-att-data-id= "product.id" > Add to cart
<span class= "oe_txt" > (<span class= "oe_quantity" > <t t-esc= "quantity" /> </span> )</span>
</button>
</div>
<img class= "media-object" t-att-src= "'data:image/png;base64,' + product.image" />
<div t-record= "product" t-field= "description_sale" > <t t-esc= "product.description_sale" /> </div>
<div class= "oe_ecommerce_price" t-record= "product" t-field= "list_price" > <t t-esc= "product.list_price" /> €</div>
<t t-call= "website_sale.product_recommended" />
</div>
</t>
</t>
</template>
<!-- Page Shop my cart -->
<template id= "mycart" >
<t t-call= "website_sale.page" >
<t t-set= "title" > My cart</t>
<t t-set= "shop_content" >
<span class= "oe_mycart" >
<t t-foreach= "order.order_line or []" t-as= "line" >
<t t-set= "product" t-value= "line.product_id" />
<t t-set= "quantity" t-value= "int(line.product_uom_qty)" />
<t t-call= "website_sale.product_card" />
</t>
2013-07-24 09:42:18 +00:00
<t t-call= "website_sale.product_recommended" />
<t t-call= "website_sale.total" />
<div class= "media well well-small" t-if= "order.order_line" >
2013-07-23 08:18:13 +00:00
<form action= "/shop/mycart" class= "navbar-form" >
<input name= "code" type= "text" placeholder= "Reduction Code..." />
<button class= "btn" > Submit your Reduction Code</button>
</form>
</div>
<a t-if= "order.order_line" href= "/shop/checkout" > <button class= "btn btn-success" > Next stage</button> </a>
</span>
</t>
</t>
</template>
<!-- Total Shop my cart -->
<template id= "total" >
<div class= "oe_total" >
<div class= "media well well-small" >
<table t-if= "order.order_line" >
<tr > <td > Untaxed Amount</td> <td > <t t-esc= "order.amount_untaxed" /> €</td> </tr>
<tr > <td > Taxes</td> <td > <t t-esc= "order.amount_tax" /> €</td> </tr>
<tr > <td > Total</td> <td > <h3 > <t t-esc= "order.amount_total" /> €</h3> </td> </tr>
</table>
<span t-if= "not order.order_line" > Your cart is empty</span>
</div>
</div>
</template>
<!-- Page confirm my cart -->
<template id= "checkout" >
<t t-call= "website.layout" >
2013-07-23 15:16:07 +00:00
<t t-set= "head" >
<script type= "text/javascript" src= "/website_sale/static/src/js/ecommerce.js" > </script>
<link rel= 'stylesheet' href= '/website_sale/static/src/css/ecommerce.css' />
<t t-raw= "head" />
</t>
2013-07-23 08:18:13 +00:00
<t t-set= "title" > Shop - Checkout</t>
2013-07-30 18:24:33 +00:00
<div class= "container mt48 oe_ecommerce" >
2013-07-23 08:18:13 +00:00
<div class= "row" >
<div class= "span4 oe_total" >
<table class= "table table-condensed" t-if= "order.order_line" >
<thead >
<tr > <th > Product</th> <th > Qty.</th> <th > Price</th> </tr>
</thead>
<tbody >
<t t-foreach= "order.order_line or []" t-as= "line" >
2013-07-24 09:42:18 +00:00
<tr >
<td > <t t-esc= "line.product_id.name" /> </td>
<td > <t t-esc= "int(line.product_uom_qty)" /> </td>
<td class= "css_alignright" > <t t-esc= "line.product_id.list_price" /> €</td>
</tr>
2013-07-23 08:18:13 +00:00
</t>
<tr > <td colspan= "3" style= "visibility: hidden; border: 0" > -</td> </tr>
<tr > <th > Untaxed Amount</th> <td > </td> <td > <t t-esc= "order.amount_untaxed" /> €</td> </tr>
<tr > <th > Taxes</th> <td > </td> <td > <t t-esc= "order.amount_tax" /> €</td> </tr>
<tr > <th > Total</th> <td > </td> <td > <t t-esc= "order.amount_total" /> €</td> </tr>
</tbody>
2013-07-02 12:06:25 +00:00
</table>
</div>
2013-07-23 08:18:13 +00:00
<div class= "span8 oe_checkout" >
2013-07-23 15:16:07 +00:00
<div class= "js_inputs row" >
2013-07-26 09:26:43 +00:00
<a t-if= "not partner" t-att-href= "'/admin#action=redirect&url=%%s/shop/checkout' %% host_url" class= "btn btn-primary" > Log me, I have an account</a>
2013-07-23 08:18:13 +00:00
<h3 class= "span8" > Billing Information</h3>
2013-07-23 15:16:07 +00:00
<label class= "span8 css_required" > Name and firstname<input class= "span7" type= "text" name= "name" placeholder= "Name and firstname" t-att-value= "partner.name or ''" /> </label>
<label class= "span4 css_required" > Telephone<input type= "tel" name= "phone" placeholder= "Telephone" t-att-value= "partner.phone or ''" /> </label>
<label class= "span4" > Fax<input type= "tel" name= "fax" placeholder= "Fax" t-att-value= "partner.fax or ''" /> </label>
<label class= "span4" > Company<input type= "text" name= "company" placeholder= "Company" t-att-value= "partner.parent_id and partner.parent_id.name or ''" /> </label>
<label class= "span4 css_required" > Email address<input type= "email" name= "email" placeholder= "Email address" t-att-value= "partner.email or ''" /> </label>
<label class= "span8 css_required" > Street<input class= "span7" type= "text" name= "street" placeholder= "Street address" t-att-value= "partner.street or ''" /> </label>
<label class= "span4 css_required" > City<input type= "text" name= "city" placeholder= "City" t-att-value= "partner.city or ''" /> </label>
2013-07-23 15:42:11 +00:00
<label class= "span4" > State / Province <select name= "state_id" >
<option value= "" > State / Province...</option>
<t t-foreach= "states or []" t-as= "state" >
<option t-att-value= "state.id" t-att-selected= "partner and partner.state_id and state.id == partner.state_id.id or None" > <t t-esc= "state.name" /> </option>
</t>
</select> </label>
2013-07-23 15:16:07 +00:00
<label class= "span4 css_required" > Zip / Postal Code<input type= "text" name= "zip" placeholder= "Zip/Postal Code" t-att-value= "partner.zip or ''" /> </label>
<label class= "span4 css_required" > Country <select name= "country_id" >
<option value= "" > Country...</option>
<t t-foreach= "countries or []" t-as= "country" >
<option t-att-value= "country.id" t-att-selected= "partner and partner.country_id and country.id == partner.country_id.id or None" > <t t-esc= "country.name" /> </option>
</t>
</select> </label>
<label class= "span8 checkbox" > Ship to different address<input type= "checkbox" name= "shipping_different" /> </label>
2013-07-23 08:18:13 +00:00
</div>
2013-07-23 15:16:07 +00:00
<div class= "js_inputs js_shipping row" style= "display:none" >
2013-07-23 08:18:13 +00:00
<h3 class= "span8 oe_shipping" style= "display:none" > Shipping Information</h3>
2013-07-24 09:42:18 +00:00
<label class= "span8 css_required" > Name and firstname<input class= "span7" type= "text" name= "shipping_name" placeholder= "Name and firstname" t-att-value= "shipping.name or ''" /> </label>
<label class= "span4 css_required" > Telephone<input type= "tel" name= "shipping_phone" placeholder= "Telephone" t-att-value= "shipping.phone or ''" /> </label>
<label class= "span4" > Fax<input type= "tel" name= "shipping_fax" placeholder= "Fax" t-att-value= "shipping.fax or ''" /> </label>
<label class= "span8 css_required" > Street<input class= "span7" type= "text" name= "shipping_street" placeholder= "Street address" t-att-value= "shipping.street or ''" /> </label>
<label class= "span4 css_required" > City<input type= "text" name= "shipping_city" placeholder= "City" t-att-value= "shipping.city or ''" /> </label>
2013-07-23 15:42:11 +00:00
<label class= "span4" > State / Province <select name= "shipping_state_id" >
<option value= "" > State / Province...</option>
<t t-foreach= "states or []" t-as= "state" >
2013-07-24 09:42:18 +00:00
<option t-att-value= "state.id" t-att-selected= "shipping and shipping.state_id and state.id == shipping.state_id.id or None" > <t t-esc= "state.name" /> </option>
2013-07-23 15:42:11 +00:00
</t>
</select> </label>
2013-07-24 09:42:18 +00:00
<label class= "span4 css_required" > Zip / Postal Code<input type= "text" name= "shipping_zip" placeholder= "Zip/Postal Code" t-att-value= "shipping.zip or ''" /> </label>
2013-07-23 15:16:07 +00:00
<label class= "span4 css_required" > Country <select name= "shipping_country_id" >
<option value= "" > Country...</option>
<t t-foreach= "countries or []" t-as= "country" >
2013-07-24 09:42:18 +00:00
<option t-att-value= "country.id" t-att-selected= "shipping and shipping.country_id and country.id == shipping.country_id.id or None" > <t t-esc= "country.name" /> </option>
2013-07-23 15:16:07 +00:00
</t>
</select> </label>
2013-07-23 08:18:13 +00:00
</div>
2013-07-24 09:42:18 +00:00
<div class= "js_payments css_payments row" >
2013-07-24 12:23:30 +00:00
<h3 class= "span8" > Click on your payment method</h3>
<t t-foreach= "payments or []" t-as= "payment" >
<div class= "css_payment" t-att-title= "payment.name" >
<div class= "js_error_payment css_error_payment" > </div>
<t t-raw= "payment._content" />
</div>
</t>
2013-07-22 10:28:57 +00:00
</div>
</div>
2013-07-23 08:18:13 +00:00
</div>
</div>
</t>
</template>
2013-07-23 13:39:23 +00:00
2013-07-24 09:42:18 +00:00
<template id= "confirmed" >
2013-07-23 08:18:13 +00:00
<t t-call= "website_sale.page" >
<t t-set= "title" > Order</t>
<t t-set= "shop_content" >
2013-07-24 10:26:54 +00:00
<table class= "table table-condensed" t-if= "order.order_line" >
<thead >
<tr > <th > Product</th> <th > Qty.</th> <th > Price</th> </tr>
</thead>
<tbody >
<t t-foreach= "order.order_line or []" t-as= "line" >
<tr >
<td > <t t-esc= "line.product_id.name" /> </td>
<td > <t t-esc= "int(line.product_uom_qty)" /> </td>
<td class= "css_alignright" > <t t-esc= "line.product_id.list_price" /> €</td>
</tr>
</t>
<tr > <td colspan= "3" style= "visibility: hidden; border: 0" > -</td> </tr>
<tr > <th > Untaxed Amount</th> <td > </td> <td > <t t-esc= "order.amount_untaxed" /> €</td> </tr>
<tr > <th > Taxes</th> <td > </td> <td > <t t-esc= "order.amount_tax" /> €</td> </tr>
<tr > <th > Total</th> <td > </td> <td > <t t-esc= "order.amount_total" /> €</td> </tr>
</tbody>
</table>
2013-07-23 08:18:13 +00:00
</t>
</t>
</template>
</data>
2013-07-01 00:20:54 +00:00
</openerp>