<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"/>
- <t t-raw="head or ''"/>
- </t-->
<t t-set="additional_title">Shop</t>
<div id="wrap" class="js_sale">
<div class="oe_structure"/>
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>
<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" class="agr" t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img"}'/>
+ <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)"/>
<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" style="width: 108px;">
+ <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>
<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"/>
+ <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='{
<div class="text-muted" t-field="line.name"/>
</td>
<td class="text-center" name="price">
- <t t-if="(compute_currency(line.product_id.lst_price) - line.price_unit) > 0.01">
+ <t t-if="(line.price_unit - line.price_reduce) > 1">
<del class="text-danger" style="white-space: nowrap;"
- t-field="line.product_id.lst_price" t-field-options='{
+ 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" style="white-space: nowrap;" t-field-options='{
+ <span t-field="line.price_reduce" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
</td>
<td class="text-center">
- <div class="input-group">
+ <div class="input-group oe_website_spinner">
<span class="input-group-addon">
<a t-attf-href="#" class="mb8 js_add_cart_json" data-no-instant="">
<i class="fa fa-minus"></i>
<input type="text" name="name" class="form-control" t-att-value="checkout.get('name')"/>
</div>
<div t-if="has_check_vat" class="clearfix"/>
- <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-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 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="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('country_id') and 'has-error' or ''} col-lg-6">
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">-- Create a new address --</option>
+ <option value="-1" t-att-selected="error and len(error) > 0 and shipping_id == -1">-- Create a new address --</option>
</select>
</div>
</div>
<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="shipping_zip">Zip / Postal Code</label>
+ <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="shipping_country_id">Country</label>
- <select name="shipping_country_id" class="form-control" t-att-readonly=" 'readonly' if shipping_id >= 0 else ''">
+ <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>
</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">
<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>