<!-- Layout and common templates -->
-<template id="debugger" inherit_id="website.debugger" name="Event Debugger">
- <xpath expr="//script[last()]" position="after">
- <script type="text/javascript" src="/website_sale/static/src/js/website.tour.sale.js"></script>
- </xpath>
+<template id="assets_frontend" inherit_id="website.assets_frontend" name="Shop">
+ <xpath expr="." position="inside">
+ <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
+ <link rel='stylesheet' href='/website_sale/static/src/css/website_mail.css'/>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale_payment.js"></script>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale_validate.js"></script>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_buy.js"></script>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tracking.js"></script>
+ </xpath>
</template>
<template id="assets_editor" inherit_id="website.assets_editor" name="Shop Editor" groups="base.group_sale_manager">
<xpath expr="." position="inside">
<script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js"></script>
- <script type="text/javascript" src="/website_sale/static/src/js/website.tour.shop.js"></script>
+ <script type="text/javascript" src="/website_sale/static/src/js/website_sale_tour_shop.js"></script>
</xpath>
</template>
</li>
</xpath>
</template>
+
<template id="search" name="Search hidden fields">
- <input t-if="attrib" type="hidden" name="filters" t-att-value="attrib"/>
- <input t-if="category" type="hidden" name="category" t-att-value="int(category or 0)"/>
- <div class="input-group">
- <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search"/>
- <span class="input-group-btn">
- <a class="btn btn-default a-submit"><i class="fa fa-search"/></a>
- </span>
+ <form t-att-action="keep('/shop'+ ('/category/'+slug(category)) if category else '', search=0)" method="get" t-att-class="search_class">
+
+ <t t-if="attrib_values">
+ <t t-foreach="attrib_values" t-as="a">
+ <input type="hidden" name="attrib" t-att-value="'%s-%s' % (a[0], a[1])"/>
+ </t>
+ </t>
+ <div class="input-group">
+ <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search"/>
+ <span class="input-group-btn">
+ <a class="btn btn-default a-submit"><i class="fa fa-search"/></a>
+ </span>
</div>
+
+ </form>
</template>
<template id="404">
<!-- Product item used by /shop and /shop/cart -->
<template id="products_item" name="Product item">
+ <form action="/shop/cart/update" method="post" style="display: inline-block;">
<div itemscope="itemscope" itemtype="http://schema.org/Product">
<div class="ribbon-wrapper">
<div class="ribbon btn btn-danger">Sale</div>
</div>
<div class="oe_product_image">
- <a itemprop="url" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'filters', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}">
- <img itemprop="image" class="img img-responsive" t-attf-src="/website/image/product.template/#{product.id}/image#{'' if product_image_big else '?max_width=300&max_height=300'}"/>
+ <a itemprop="url" t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']>1 else None))">
+ <img itemprop="image" class="img img-responsive" t-att-src="website.image_url(product, 'image', None if product_image_big else '300x300')"/>
</a>
</div>
<section>
- <h5><strong><a itemprop="name" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'filters', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}" t-field="product.name"/></strong></h5>
+ <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>
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price" t-if="product.product_variant_ids">
<b>
- <t t-if="abs(product.product_variant_ids[0].lst_price - product.product_variant_ids[0].price) > 0.2">
- <del class="text-danger" t-field="product.product_variant_ids[0].lst_price" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>&nbsp;
+ <t t-if="(compute_currency(product.lst_price) - product.price) > 0.1">
+ <del class="text-danger" style="white-space: nowrap;" t-field="product.lst_price" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>&nbsp;
</t>
- <span t-field="product.product_variant_ids[0].price" t-field-options='{
+ <span t-field="product.price" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'>
</span>
- <span itemprop="price" style="display:none;" t-esc="product.product_variant_ids[0].price"/>
- <span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
+ <span itemprop="price" style="display:none;" t-esc="product.price"/>
+ <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
</b>
</div>
</section>
</div>
+ </form>
</template>
-<template id="products_description" inherit_option_id="website_sale.products_item" name="Product Description">
+<template id="products_description" inherit_id="website_sale.products_item" active="False" customize_show="True" name="Product Description">
<xpath expr="//div[@class='product_price']" position="before">
<div class="text-info oe_subdescription" contenteditable="false">
<div itemprop="description" t-field="product.description_sale"></div>
</xpath>
</template>
-<template id="products_add_to_cart" inherit_option_id="website_sale.products_item" name="Add to Cart">
+<template id="products_add_to_cart" inherit_id="website_sale.products_item" active="False" customize_show="True" name="Add to Cart">
<xpath expr="//div[@class='product_price']" position="inside">
- <form action="/shop/cart/update" method="post" style="display: inline-block;">
- <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
- <a class="btn btn-default btn-xs fa fa-shopping-cart a-submit"/>
- </form>
+ <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
+ <a class="btn btn-default btn-xs fa fa-shopping-cart a-submit"/>
</xpath>
</template>
<template id="products" name="Products">
<t t-call="website.layout">
- <t t-set="head">
- <t t-call="web.jqueryui_conflict">
- <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
- </t>
- <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <t t-raw="head or ''"/>
- </t>
<t t-set="additional_title">Shop</t>
<div id="wrap" class="js_sale">
<div class="oe_structure"/>
<div class="container oe_website_sale">
<div class="products_pager">
- <div class="row">
- <form t-att-action="keep('/shop',search=0)" method="get" class="pagination form-inline col-md-3">
- <t t-call="website_sale.search"/>
- </form>
+ <div class="row" style="width: 100%;">
+ <t t-call="website_sale.search"><t t-set="search_class">pagination form-inline col-md-3</t></t>
<t t-call="website.pager"/>
</div>
</div>
t-attf-class="oe_product oe_grid oe-height-#{td_product['y']*2} #{ td_product['class'] }">
<div class="oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
-
- <div class="css_options" t-ignore="true" groups="base.group_website_publisher">
- <div t-attf-class="dropdown js_options" t-att-data-id="product.id">
- <button class="btn btn-default" t-att-id="'dopprod-%s' % product.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></button>
- <ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % product.id">
- <li class='dropdown-submenu'>
- <a tabindex="-1" href="#">Size</a>
- <ul class="dropdown-menu" name="size">
- <li><a href="#">
- <table>
- <tr>
- <td class="selected"></td>
- <td t-att-class="product.website_size_x > 1 and 'selected'"></td>
- <td t-att-class="product.website_size_x > 2 and 'selected'"></td>
- <td t-att-class="product.website_size_x > 3 and 'selected'"></td>
- </tr>
- <tr>
- <td t-att-class="product.website_size_y > 1 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 1 and product.website_size_x > 1 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 1 and product.website_size_x > 2 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 1 and product.website_size_x > 3 and 'selected'"></td>
- </tr>
- <tr>
- <td t-att-class="product.website_size_y > 2 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 2 and product.website_size_x > 1 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 2 and product.website_size_x > 2 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 2 and product.website_size_x > 3 and 'selected'"></td>
- </tr>
- <tr>
- <td t-att-class="product.website_size_y > 3 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 3 and product.website_size_x > 1 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 3 and product.website_size_x > 2 and 'selected'"></td>
- <td t-att-class="product.website_size_y > 3 and product.website_size_x > 3 and 'selected'"></td>
- </tr>
- </table>
- </a></li>
- </ul>
- </li>
- <li class='dropdown-submenu'>
- <a tabindex="-1" href="#">Styles</a>
- <ul class="dropdown-menu" name="style">
- <t t-foreach="styles" t-as="style">
- <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>
- </t>
- </ul>
- </li>
- <li class='dropdown-submenu'>
- <a tabindex="-1" href="#">Promote</a>
- <ul class="dropdown-menu" name="sequence">
- <li><a href="#" class="js_go_to_top">Push to top</a></li>
- <li><a href="#" class="js_go_up">Push up</a>
- </li>
- <li><a href="#" class="js_go_down">Push down</a></li>
- <li><a href="#" class="js_go_to_bottom">Push to bottom</a></li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
<t t-set="product_image_big" t-value="td_product['x']+td_product['y'] > 2"/>
<t t-call="website_sale.products_item"/>
</div>
<!-- Add to cart button-->
<template id="categories_recursive" name="Category list">
- <li t-att-class="'active' if c.id == category else ''">
+ <li t-att-class="'active' if c.id == int(category or 0) else ''">
<a t-att-href="keep('/shop/category/' + slug(c), category=0)" t-field="c.name"></a>
<ul t-if="c.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
<t t-foreach="c.child_id" t-as="c">
</li>
</template>
-<template id="products_categories" inherit_option_id="website_sale.products" name="Product Categories">
+<template id="products_categories" inherit_id="website_sale.products" active="False" customize_show="True" name="Product Categories">
<xpath expr="//div[@id='products_grid_before']" position="inside">
<ul class="nav nav-pills nav-stacked mt16">
<li t-att-class=" '' if category else 'active' "><a t-att-href="keep('/shop',category=0)">All Products</a></li>
</xpath>
</template>
-<template id="products_attributes" inherit_option_id="website_sale.products" name="Product Attribute's Filters" groups="product.group_product_attributes">
+<template id="products_attributes" inherit_id="website_sale.products" active="False" customize_show="True" name="Product Attribute's Filters">
<xpath expr="//div[@id='products_grid_before']" position="inside">
- <form t-att-action="keep('shop',attrib=0)" class="attributes" method="get">
+ <form class="js_attributes" method="get">
+ <input type="hidden" name="search" t-att-value="search"/>
<ul class="nav nav-pills nav-stacked mt16">
<t t-foreach="attributes" t-as="a">
- <li t-if="a.value_ids">
- <div t-field="a.name"/>
- <ul class="nav nav-pills nav-stacked">
+ <t t-if="a.type != 'hidden'">
+ <li t-if="a.value_ids and len(a.value_ids) > 1">
+ <div><strong t-field="a.name"/></div>
+ <t t-if="a.type == 'select'">
+ <select class="form-control" name="attrib">
+ <option value=""/>
<t t-foreach="a.value_ids" t-as="v">
- <li t-att-class="'active' if v.id in attrib_set else ''">
- <label style="margin: 0 20px;">
- <input type="checkbox" name="attrib" t-att-value="v.id" t-att-checked="'checked' if v.id in attrib_set else ''"/>
- <span style="font-weight: normal" t-field="v.name"/>
- </label>
- </li>
+ <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 ''"/>
</t>
- </ul>
+ </select>
+ </t>
+ <t t-if="a.type == 'radio'">
+ <ul class="nav nav-pills nav-stacked">
+ <t t-foreach="a.value_ids" t-as="v">
+ <li t-att-class="'active' if v.id in attrib_set else ''">
+ <label style="margin: 0 20px;">
+ <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 ''"/>
+ <span style="font-weight: normal" t-field="v.name"/>
+ </label>
+ </li>
+ </t>
+ </ul>
+ </t>
+ <t t-if="a.type == 'color'">
+ <t t-foreach="a.value_ids" t-as="v">
+ <label t-attf-style="background-color:#{v.color or v.name}"
+ t-attf-class="css_attribute_color #{'active' if v.id in attrib_set else ''}">
+ <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 ''"
+ t-att-title="v.name"/>
+ </label>
+ </t>
+ </t>
</li>
+ </t>
</t>
</ul>
</form>
</xpath>
</template>
-<template id="products_list_view" inherit_option_id="website_sale.products" name="List View">
+<template id="products_list_view" inherit_id="website_sale.products" active="False" customize_show="True" name="List View">
<xpath expr="//div[@id='products_grid']//table" position="replace">
<t t-foreach="products" t-as="product">
<div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
<template id="product" name="Product">
<t t-call="website.layout">
- <t t-set="head">
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_mail.css'/>
- </t>
<t t-set="additional_title" t-value="product.name"/>
<div itemscope="itemscope" itemtype="http://schema.org/Product" id="wrap" class="js_sale">
<div class="col-sm-4">
<ol class="breadcrumb">
<li><a t-att-href="keep(category=0)" onclick="history.go(-1); return false;">Products</a></li>
- <li t-if="category"><a t-att-href="keep()" t-field="category.name"/></li>
+ <li t-if="category"><a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name"/></li>
<li class="active"><span t-field="product.name"/></li>
</ol>
</div>
<div class="col-sm-3">
- <form t-att-action="keep(search=0)" method="get" class="pull-right">
- <t t-call="website_sale.search"/>
- </form>
+ <t t-call="website_sale.search"><t t-set="search_class">pull-right</t></t>
</div>
<div class="col-sm-4" groups="base.group_sale_manager">
<t t-call="website.publish_management">
<t t-set="object" t-value="product"/>
<t t-set="publish_edit" t-value="True"/>
+ <t t-set="action" t-value="'product.product_template_action'"/>
</t>
</div>
</div>
</section>
- <section class="container oe_website_sale" id="product_detail">
+ <section t-attf-class="container oe_website_sale #{(compute_currency(product.lst_price) - product.price) > 0.1 and 'discount'}" id="product_detail">
<div class="row">
<div class="col-sm-7 col-md-7 col-lg-7">
<span itemprop="image" t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img"}'/>
</div><div class="col-sm-5 col-md-5 col-lg-4 col-lg-offset-1">
<h1 itemprop="name" t-field="product.name">Product Name</h1>
<span itemprop="url" style="display:none;" t-esc="'/shop/product/%s' % slug(product)"/>
- <form action="/shop/cart/update" class="js_add_cart_json" method="POST">
- <input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
- <t t-if="len(product.product_variant_ids) > 1">
- <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
- <input type="radio" name="product_id" t-att-value="variant_id.id" t-att-checked="variant_id == product.product_variant_ids[0] or None"/>
- <t t-esc="variant_id.variants or ''">Standard</t>
- <span class="badge" t-if="variant_id.price_extra">
- <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>
- </span>
- </label>
+
+ <form t-att-action="keep('/shop/cart/update')" class="js_add_cart_variants" method="POST">
+
+ <div class="js_product">
+ <t t-placeholder="select">
+ <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'"/>
+ <t t-call="website_sale.variants">
+ <t t-set="ul_class" t-value="'nav-stacked'"/>
+ </t>
</t>
- <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if="product.product_variant_ids">
- <h4>
- <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
- <span class="text-danger" style="text-decoration: line-through;"
- t-field="product.product_variant_ids[0].lst_price"
- t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/><br/>
- </t>
- <b class="oe_price"
- t-field="product.product_variant_ids[0].price"
- t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>
- <span itemprop="price" style="display:none;" t-esc="product.product_variant_ids[0].price"/>
- <span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
- </h4>
- </div>
- <a class="btn btn-primary btn-lg mt8 a-submit">Add to Cart</a>
- <hr t-if="product.description_sale"/>
- <div><p t-field="product.description_sale" class="text-muted"/></div>
- <hr/>
- <p class="text-muted">
- 30-day money-back guarantee<br/>
- Free Shipping in U.S.<br/>
- Buy now, get in 2 days
- </p>
+ <t t-call="website_sale.product_price"/>
+ <p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</p>
+
+ <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>
+ </div>
+
</form>
+
+ <hr t-if="product.description_sale"/>
+ <div><p t-field="product.description_sale" class="text-muted"/></div>
+ <hr/>
+ <p class="text-muted">
+ 30-day money-back guarantee<br/>
+ Free Shipping in U.S.<br/>
+ Buy now, get in 2 days
+ </p>
</div>
</div>
</section>
<div itemprop="description" t-field="product.website_description" class="oe_structure mt16" id="product_full_description"/>
+
</div>
</t>
</template>
-<template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Alternative Products">
+<template id="product_quantity" inherit_id="website_sale.product" customize_show="True" name="Select Quantity">
+ <xpath expr="//a[@id='add_to_cart']" position="before">
+ <div class="css_quantity input-group oe_website_spinner">
+ <span class="input-group-addon">
+ <a t-attf-href="#" class="mb8 js_add_cart_json">
+ <i class="fa fa-minus"></i>
+ </a>
+ </span>
+ <input type="text" class="js_quantity form-control" data-min="1" name="add_qty" value="1"/>
+ <span class="input-group-addon">
+ <a t-attf-href="#" class="mb8 float_left js_add_cart_json">
+ <i class="fa fa-plus"></i>
+ </a>
+ </span>
+ </div>
+ </xpath>
+</template>
+
+<template id="product_price">
+ <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16">
+ <h4 class="oe_price_h4 css_editable_mode_hidden">
+ <span class="text-danger oe_default_price" style="text-decoration: line-through; white-space: nowrap;"
+ t-field="product.lst_price"
+ t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>
+ <b class="oe_price" style="white-space: nowrap;"
+ t-field="product.price"
+ t-field-options='{
+ "widget": "monetary",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>
+ <span itemprop="price" style="display:none;" t-esc="product.price"/>
+ <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
+ </h4>
+ <h4 class="css_editable_mode_display" style="display: none;">
+ <span t-field="product.lst_price"
+ t-field-options='{
+ "widget": "monetary",
+ "display_currency": "website.pricelist_id.currency_id"
+ }'/>
+ </h4>
+ <h4 class="hidden oe_not_available bg-warning">Product not available</h4>
+ </div>
+</template>
+
+<template id="product_variants" inherit_id="website_sale.product" active="False" customize_show="True" name="List View of Variants">
+ <xpath expr="//t[@t-placeholder='select']" position="replace">
+ <input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
+ <t t-if="len(product.product_variant_ids) > 1">
+ <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
+ <input type="radio" name="product_id" class="js_product_change" t-att-checked="'checked' if variant_id_index == 0 else ''" t-att-value="variant_id.id" t-att-data-lst_price="variant_id.lst_price" t-att-data-price="variant_id.price"/>
+ <span t-esc="variant_id.name_get()[0][1]"/>
+ <span class="badge" t-if="variant_id.price_extra">
+ <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" style="white-space: nowrap;" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>
+ </span>
+ </label>
+ </t>
+ </xpath>
+</template>
+
+<template id="variants">
+ <t t-set="attribute_value_ids" t-value="get_attribute_value_ids(product)"/>
+ <ul t-attf-class="list-unstyled js_add_cart_variants #{ul_class}" t-att-data-attribute_value_ids="attribute_value_ids">
+ <t t-foreach="product.attribute_line_ids" t-as="variant_id">
+ <li t-if="len(variant_id.value_ids) > 1">
+
+ <strong t-field="variant_id.attribute_id.name"/>
+
+ <t t-if="variant_id.attribute_id.type in ['select', 'hidden']">
+ <select class="form-control js_variant_change" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)">
+ <t t-foreach="variant_id.value_ids" t-as="value_id">
+ <option t-att-value="value_id.id">
+ <span t-field="value_id.name"/>
+ <span t-if="value_id.price_extra">
+ <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>
+ </span>
+ </option>
+ </t>
+ </select>
+ </t>
+
+ <t t-if="variant_id.attribute_id.type == 'radio'">
+ <ul class="list-unstyled">
+ <t t-set="inc" t-value="0"/>
+ <t t-foreach="variant_id.value_ids" t-as="value_id">
+ <li t-if="value_id.product_ids" class="form-group js_attribute_value" style="margin: 0;">
+ <label class="control-label" style="margin: 0 20px;">
+ <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;"/>
+ <span t-field="value_id.name"/>
+ <span class="badge" t-if="value_id.price_extra">
+ <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
+ }'/>
+ </span>
+ </label>
+ </li>
+ <t t-set="inc" t-value="inc+1"/>
+ </t>
+ </ul>
+ </t>
+
+ <t t-if="variant_id.attribute_id.type == 'color'">
+ <ul class="list-inline">
+ <t t-set="inc" t-value="0"/>
+ <li t-foreach="variant_id.value_ids" t-as="value_id">
+ <label t-attf-style="background-color:#{value_id.color or value_id.name}"
+ t-attf-class="css_attribute_color #{'active' if not inc else ''}">
+ <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"
+ t-att-title="value_id.name"/>
+ </label>
+ <t t-set="inc" t-value="inc+1"/>
+ </li>
+ </ul>
+ </t>
+
+ </li>
+ </t>
+ </ul>
+</template>
+
+<template id="recommended_products" inherit_id="website_sale.product" customize_show="True" name="Alternative Products">
<xpath expr="//div[@id='product_full_description']" position="after">
<div class="container mt32" t-if="product.alternative_product_ids">
<h3>Suggested alternatives:</h3>
</xpath>
</template>
-<template id="product_attributes" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product attributes" groups="product.group_product_attributes">
+<template id="product_attributes" inherit_id="website_sale.product" customize_show="True" name="Product attributes">
<xpath expr="//p[@t-field='product.description_sale']" position="after">
- <hr t-if="product.attribute_lines"/>
+ <hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])"/>
<p class="text-muted">
- <t t-foreach="product.attribute_lines" t-as="l">
- <span t-field="l.attribute_id.name"/>: <span t-field="l.value_id.name"/> <br/>
+ <t t-foreach="product.attribute_line_ids" t-as="variant_id">
+ <t t-if="len(variant_id.value_ids)==1">
+ <span t-field="variant_id.attribute_id"/>: <span t-field="variant_id.value_ids[0].name"/><br/>
+ </t>
</t>
</p>
</xpath>
</template>
-<template id="product_comment" inherit_option_id="website_sale.product" name="Discussion">
+<!-- Product options: OpenChatter -->
+
+<template id="product_comment" inherit_id="website_sale.product" active="False" customize_show="True" name="Discussion">
<xpath expr="//div[@t-field='product.website_description']" position="after">
<hr class="mb32"/>
<section class="container">
<ul class="media-list" id="comments-list" t-if="product.website_message_ids">
<li t-foreach="product.website_message_ids" t-as="message" class="media">
<div class="media-body oe_msg">
- <img class="media-object pull-left oe_msg_avatar" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(message.author_id.id)" style="width: 50px; margin-right: 10px;"/>
+ <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;"/>
<div class="media-body oe_msg_content">
<t t-call="website.publish_short">
<t t-set="object" t-value="message"/>
</ul>
<div class="css_editable_mode_hidden">
<form id="comment" t-attf-action="/shop/product/comment/#{product.id}" method="POST">
- <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
+ <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;"/>
<div class="pull-left mb32" style="width: 75%%">
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
<a class="btn btn-primary mt8 a-submit">Post</a>
<template id="cart" name="Shopping Cart">
<t t-call="website.layout">
- <t t-set="head">
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <t t-raw="head or ''"/>
- </t>
<div id="wrap">
<div class="container oe_website_sale">
</tr>
</thead>
<tbody>
- <tr t-foreach="website_sale_order.website_order_line" t-as="line">
+ <t t-foreach="website_sale_order.website_order_line" t-as="line">
+ <tr>
<td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
<td align="center" t-if="line.product_id.product_tmpl_id">
<span t-field="line.product_id.image_small"
<td t-if="line.product_id.product_tmpl_id">
<div>
<a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
- <strong t-field="line.name"/>
+ <strong t-esc="line.product_id.name_get()[0][1]"/>
</a>
</div>
- <div class="text-muted" t-field="line.product_id.description_sale"/>
+ <div class="text-muted" t-field="line.name"/>
</td>
<td class="text-center" name="price">
- <t t-if="abs(line.product_id.lst_price - line.price_unit) > 0.2">
- <del class="text-danger"
- t-field="line.product_id.lst_price" t-field-options='{
- "widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ <t t-if="(line.price_unit - line.price_reduce) > 1">
+ <del class="text-danger" style="white-space: nowrap;"
+ t-field="line.price_unit" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>&nbsp;
</t>
- <span t-field="line.price_unit" t-field-options='{
+ <span t-field="line.price_reduce" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
</td>
- <td>
- <div class="input-group">
+ <td class="text-center">
+ <div class="input-group oe_website_spinner">
<span class="input-group-addon">
- <a t-attf-href="#" class="mb8 js_add_cart_json">
+ <a t-attf-href="#" class="mb8 js_add_cart_json" data-no-instant="">
<i class="fa fa-minus"></i>
</a>
</span>
t-att-data-product-id="line.product_id.id"
t-att-value="int(line.product_uom_qty)"/>
<span class="input-group-addon">
- <a t-attf-href="#" class="mb8 float_left js_add_cart_json">
+ <a t-attf-href="#" class="mb8 float_left js_add_cart_json" data-no-instant="">
<i class="fa fa-plus"></i>
</a>
</span>
</div>
-
</td>
</tr>
+ </t>
</tbody>
</table>
<t t-call="website_sale.total"/>
<div class="clearfix"/>
- <a t-if="website_sale_order and website_sale_order.website_order_line" href="/shop/checkout" class="btn btn-primary pull-right mb32">Process Checkout <span class="fa fa-long-arrow-right"/></a>
+
+ <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>
+
<div class="oe_structure"/>
</div>
<div class="col-lg-3 col-lg-offset-1 col-sm-3 col-md-3 text-muted" id="right_column">
</t>
</template>
-<template id="suggested_products_list" inherit_id="website_sale.cart" inherit_option_id="website_sale.cart" name="Suggested Products in my cart">
+<template id="suggested_products_list" inherit_id="website_sale.cart" customize_show="True" name="Suggested Products in my cart">
<xpath expr="//table[@id='cart_products']" position="after">
<table t-if="suggested_products" class='table table-striped table-condensed'>
<colgroup>
</colgroup>
<thead>
<tr>
- <th colspan="2">Suggested products</th>
+ <th colspan="4">Suggested products:</th>
</tr>
</thead>
<tbody>
<tr t-foreach="suggested_products" t-as="product">
<td>
- <a t-attf-href="/shop/product/#{ slug(product) }">
+ <a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
<span t-field="product.image_small"
t-field-options='{"widget": "image", "class": "img-rounded"}'/>
</a>
</td>
<td>
<div>
- <a t-attf-href="/shop/product/#{ slug(product) }">
+ <a t-attf-href="/shop/product/#{ slug(product.product_tmpl_id) }">
<strong t-field="product.name"/>
</a>
</div>
<div class="text-muted" t-field="product.description_sale"/>
</td>
<td>
- <t t-if="abs(product.product_variant_ids[0].lst_price - product.product_variant_ids[0].price) > 0.2">
- <del class="text-danger"
- t-field="product.product_variant_ids[0].lst_price" t-field-options='{
- "widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ <t t-if="(compute_currency(product.lst_price) - product.price) > 0.1">
+ <del class="text-danger" style="white-space: nowrap;"
+ t-field="product.lst_price" t-field-options='{
+ "widget": "monetary",
+ "from_currency": "website.currency_id",
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>&nbsp;
</t>
- <span t-field="product.product_variant_ids[0].price" t-field-options='{
+ <span t-field="product.price" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
</td>
<td class="text-center">
<form action="/shop/cart/update" method="post">
- <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
+ <input name="product_id" t-att-value="product.id" type="hidden"/>
<a class="btn btn-link a-submit"><strong>Add to Cart</strong></a>
</form>
</td>
</xpath>
</template>
-<template id="continue_shopping" inherit_id="website_sale.cart" inherit_option_id="website_sale.cart" name="Continue Shopping Button">
+<template id="continue_shopping" inherit_id="website_sale.cart" customize_show="True" name="Continue Shopping Button">
<xpath expr="//a[@href='/shop/checkout']" position="before">
<a href="/shop" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Continue Shopping</a>
</xpath>
</template>
-<template id="reduction_code" inherit_option_id="website_sale.cart" name="Reduction Code">
+<template id="reduction_code" inherit_id="website_sale.cart" active="False" customize_show="True" name="Reduction Code">
<xpath expr="//div[@id='right_column']" position="inside">
<h4>Coupon Code</h4>
<p>
<template id="checkout">
<t t-call="website.layout">
- <t t-set="head">
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <t t-raw="head or ''"/>
- </t>
<t t-set="additional_title">Shop - Checkout</t>
<div id="wrap">
<div class="container oe_website_sale">
<label class="control-label" for="contact_name">Your Name</label>
<input type="text" name="name" class="form-control" t-att-value="checkout.get('name')"/>
</div>
- <div t-attf-class="form-group #{error.get('street2') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="street2" style="font-weight: normal">Company Name</label>
- <input type="text" name="street2" class="form-control" t-att-value="checkout.get('street2')"/>
+ <div t-if="has_check_vat" class="clearfix"/>
+ <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''} col-lg-6">
+ <label class="control-label" for="street" style="font-weight: normal">Company Name</label>
+ <input type="text" name="street" class="form-control" t-att-value="checkout.get('street')"/>
</div>
- <div class="col-lg-6"> </div>
- <div t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
+ <div t-if="has_check_vat" t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="vat" style="font-weight: normal">VAT Number</label>
<input type="text" name="vat" class="form-control" t-att-value="checkout.get('vat')"/>
</div>
<input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone')"/>
</div>
- <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="street">Street</label>
- <input type="text" name="street" class="form-control" t-att-value="checkout.get('street')"/>
+ <div t-attf-class="form-group #{error.get('street2') and 'has-error' or ''} col-lg-6">
+ <label class="control-label" for="street2">Street</label>
+ <input type="text" name="street2" class="form-control" t-att-value="checkout.get('street2')"/>
</div>
<div class="clearfix"/>
<input type="text" name="city" class="form-control" t-att-value="checkout.get('city')"/>
</div>
<div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="zip">Zip / Postal Code</label>
+ <label class="control-label" for="zip" style="font-weight: normal">Zip / Postal Code</label>
<input type="text" name="zip" class="form-control" t-att-value="checkout.get('zip')"/>
</div>
- <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="state_id" style="font-weight: normal">State / Province</label>
- <select name="state_id" class="form-control">
- <option value="">select...</option>
- <t t-foreach="states or []" t-as="state">
- <option t-att-value="state.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
- </t>
- </select>
- </div>
<div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Country</label>
+ <label class="control-label" for="country_id">Country</label>
<select name="country_id" class="form-control">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
</t>
</select>
</div>
+ <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">
+ <label class="control-label" for="state_id" style="font-weight: normal">State / Province</label>
+ <select name="state_id" class="form-control">
+ <option value="">select...</option>
+ <t t-foreach="states or []" t-as="state">
+ <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>
+ </t>
+ </select>
+ </div>
<div class="clearfix"/>
- <div class="form-group col-lg-6" groups="sale.group_delivery_invoice_address">
- <label>
- <input type="checkbox" name="shipping_different" t-att-checked="checkout.get('shipping_different')"/>
- <span>Ship to a different address</span>
- </label>
+ <div class="form-group col-lg-12">
+ <label>Shipping</label>
+ <select name="shipping_id" class="form-control">
+ <option value="0">Ship to the same address</option>
+ <t t-foreach="shippings" t-as="shipping">
+ <option t-att-value="shipping.id" t-att-selected="shipping.id == shipping_id"
+ t-att-data-shipping_name="shipping.name"
+ t-att-data-shipping_phone="shipping.phone"
+ t-att-data-shipping_street="shipping.street"
+ t-att-data-shipping_city="shipping.city"
+ t-att-data-shipping_zip="shipping.zip"
+ t-att-data-shipping_state_id="shipping.state_id and shipping.state_id.id"
+ t-att-data-shipping_country_id="shipping.country_id and shipping.country_id.id"
+ ><t t-esc="', '.join('\n'.join(shipping.name_get()[0][1].split(',')).split('\n')[1:])"/></option>
+ </t>
+ <option value="-1" t-att-selected="error and len(error) > 0 and shipping_id == -1">-- Create a new address --</option>
+ </select>
</div>
</div>
- <div class="js_shipping row mb16" t-att-style="not checkout.get('shipping_different') and 'display:none' or ''" groups="sale.group_delivery_invoice_address">
+ <div class="js_shipping row mb16" t-att-style="not shipping_id and 'display:none' or ''">
<h3 class="oe_shipping col-lg-12 mt16">Shipping Information</h3>
<div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Name (Shipping)</label>
- <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')"/>
+ <label class="control-label" for="shipping_name">Name (Shipping)</label>
+ <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')" t-att-readonly="'readonly' if shipping_id >= 0 else ''"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Phone</label>
- <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')"/>
+ <label class="control-label" for="shipping_phone">Phone</label>
+ <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Street</label>
- <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')"/>
+ <label class="control-label" for="shipping_street">Street</label>
+ <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''"/>
</div>
<div class="clearfix"/>
<div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">City</label>
- <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')"/>
+ <label class="control-label" for="shipping_city">City</label>
+ <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Zip / Postal Code</label>
- <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')"/>
- </div>
- <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name" style="font-weight: normal">State / Province</label>
- <select name="shipping_state_id" class="form-control">
- <option value="">State / Province...</option>
- <t t-foreach="states or []" t-as="state">
- <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
- </t>
- </select>
+ <label class="control-label" for="shipping_zip" style="font-weight: normal">Zip / Postal Code</label>
+ <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Country</label>
- <select name="shipping_country_id" class="form-control">
+ <label class="control-label" for="shipping_country_id">Country</label>
+ <select name="shipping_country_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id >= 0 else ''">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
</t>
</select>
</div>
+ <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
+ <label class="control-label" for="shipping_state_id" style="font-weight: normal">State / Province</label>
+ <select name="shipping_state_id" class="form-control" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''">
+ <option value="">State / Province...</option>
+ <t t-foreach="states or []" t-as="state">
+ <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>
+ </t>
+ </select>
+ </div>
+ </div>
+ <div class="clearfix">
+ <a href="/shop/cart" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Return to Cart</a>
+ <a class="btn btn-default btn-primary pull-right mb32 a-submit">Confirm <span class="fa fa-long-arrow-right"/></a>
</div>
- <a class="btn btn-default btn-primary pull-right mb32 a-submit">Confirm <span class="fa fa-long-arrow-right"/></a>
</div>
<div class="col-lg-offset-1 col-lg-3 col-md-3 text-muted">
<h3 class="page-header mt16">Your Order <small><a href="/shop/cart"><span class="fa fa-arrow-right"/> change</a></small></h3>
<t t-set="website_sale_order" t-value="website.sale_get_order()"/>
<div class="row">
- <div class="col-sm-6 text-right">Subtotal:</div>
- <div class="col-sm-6"><span t-field="website_sale_order.amount_untaxed" t-field-options='{
+ <div class="col-sm-6 text-right">Subtotal: </div>
+ <div class="col-sm-6"><span style="white-space: nowrap;" t-field="website_sale_order.amount_untaxed" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/></div>
- <div class="col-sm-6 text-right">Taxes:</div>
- <div class="col-sm-6"><span t-field="website_sale_order.amount_tax" t-field-options='{
+ <div class="col-sm-6 text-right">Taxes: </div>
+ <div class="col-sm-6"><span style="white-space: nowrap;" t-field="website_sale_order.amount_tax" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/></div>
- <div class="col-sm-6 text-right"><h4>Total To Pay:</h4></div>
- <div class="col-sm-6"><h4><span t-field="website_sale_order.amount_total" t-field-options='{
+ <div class="col-sm-6 text-right"><h4>Total To Pay: </h4></div>
+ <div class="col-sm-6"><h4><span style="white-space: nowrap;" t-field="website_sale_order.amount_total" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/></h4></div>
</div>
</div>
<template id="payment">
<t t-call="website.layout">
- <t t-set="head">
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale_payment.js"></script>
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <t t-raw="head or ''"/>
- </t>
<t t-set="additional_title">Shop - Select Payment Mode</t>
<div id="wrap">
<div class="container oe_website_sale">
</ul>
<h1 class="mb32">Validate Order</h1>
<div class="row">
+ <div class="col-lg-8 col-sm-9">
+ <t t-foreach="errors" t-as="error">
+ <div class="alert alert-danger" t-if="error">
+ <h4><t t-esc="error[0]"/></h4>
+ <t t-esc="error[1]"/>
+ </div>
+ </t>
+ </div>
<div class="col-lg-8 col-sm-9 oe_cart">
<t t-set="website_sale_order" t-value="website.sale_get_order()"/>
<table class='table table-striped table-condensed' id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
<strong t-field="line.product_id.name"/>
</td>
<td class="text-center">
- <span t-field="line.price_unit" t-field-options='{
+ <span t-field="line.price_unit" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
</td>
<td>
<div>
<a href="/shop/checkout"><span class="fa fa-arrow-right"/> Change Address</a>
</div>
- <t groups="sale.group_delivery_invoice_address">
+ <t>
<h4 class="mt32">Ship To:</h4>
<t t-if="website_sale_order.partner_shipping_id and website_sale_order.partner_shipping_id.id != website_sale_order.partner_invoice_id.id">
<div t-field="order.partner_shipping_id" t-field-options='{
<template id="confirmation">
<t t-call="website.layout">
- <t t-set="head">
- <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
- <script type="text/javascript" src="/website_sale/static/src/js/website_sale_validate.js"></script>
- <t t-raw="head or ''"/>
- </t>
<t t-set="additional_title">Shop - Confirmed</t>
<div id="wrap">
<div class="container oe_website_sale">
<h2>Thank you for your order.</h2>
<div class="oe_website_sale_tx_status" t-att-data-order-id="order.id">
</div>
+ <h3 class="mt32"><strong>Order Details:</strong></h3>
+ <table class="table">
+ <thead>
+ <tr>
+ <th>Products</th>
+ <th>Quantity</th>
+ <th class="text-right" width="100">Unit Price</th>
+ <th class="text-right" width="100">Subtotal</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="order.order_line" t-as="line">
+ <td>
+ <div>
+ <a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
+ <strong t-esc="line.product_id.name_get()[0][1]"/>
+ </a>
+ </div>
+ <div class="text-muted" t-field="line.name"/>
+ </td>
+ <td>
+ <div id="quote_qty">
+ <span t-field="line.product_uom_qty"/>
+ <span t-field="line.product_uom"/>
+ </div>
+ </td>
+ <td>
+ <strong class="text-right">
+ <div t-field="line.price_unit"
+ t-field-options='{"widget": "monetary", "display_currency": "order.pricelist_id.currency_id"}'/>
+ </strong>
+ </td>
+ <td>
+ <div class="text-right"
+ t-field="line.price_subtotal"
+ t-field-options='{"widget": "monetary", "display_currency": "order.pricelist_id.currency_id"}'/>
+ </td>
+ </tr>
+ <tr>
+ <td></td><td></td>
+ <td class="text-right"><strong>Total:</strong></td>
+ <td class="text-right">
+ <strong t-field="order.amount_total"
+ t-field-options='{"widget": "monetary", "display_currency": "order.pricelist_id.currency_id"}'/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
<div class="clearfix"/>
<div class="oe_structure"/>
</div>
"widget": "contact",
"fields": ["address", "name", "phone", "email"]
}'/>
- <t groups="sale.group_delivery_invoice_address">
+ <t>
<h4 class="mt32">Ship To:</h4>
<t t-if="order.partner_shipping_id and order.partner_shipping_id.id != order.partner_invoice_id.id">
<div t-field="order.partner_shipping_id" t-field-options='{
<tr width="100" style="border-top: 1px solid #000" id="order_total">
<th><h3>Total: </h3></th>
<th class="text-right">
- <h3><span t-field="website_sale_order.amount_total" t-field-options='{
+ <h3><span t-field="website_sale_order.amount_total" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/></h3>
</th>
</tr>
<tr width="120" class="text-muted" id="order_total_taxes">
<td><abbr title="Taxes may be updated after providing shipping address">Taxes:</abbr></td>
<td class="text-right">
- <span t-field="website_sale_order.amount_tax" t-field-options='{
+ <span t-field="website_sale_order.amount_tax" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
- "display_currency": "website.pricelist_id.currency_id"
+ "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
</td>
</tr>
</table>
</template>
+<template id="website.layout_footer_copyright" inherit_id="website.layout" name="Footer Copyright">
+ <xpath expr="//footer" position="inside">
+ <div class="container mt16 mb8">
+ <div class="pull-right" t-ignore="true" t-if="not editable">
+ Powered by <a class="label label-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>,
+ the #1 <a href="http://www.odoo.com/page/e-commerce">Open Source eCommerce</a>.
+ </div>
+ <div class="pull-left text-muted">
+ Copyright &copy; <span t-field="res_company.name">Company name</span>
+ </div>
+ </div>
+ </xpath>
+</template>
+
+
+<!-- User Navbar -->
+<template id="content_new_product" inherit_id="website.user_navbar" groups="base.group_sale_manager">
+ <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
+ <li><a id="create-new-product" href="#" data-action="new_product">New Product</a></li>
+ </xpath>
+</template>
+
</data>
</openerp>