- <t t-set="additional_title">Shop - Checkout</t>
- <div id="wrap">
- <div class="container oe_website_sale">
- <ul class="wizard pull-right">
- <li><a href="/shop/mycart" class="text-success">Review Order<span class="chevron"></span></a></li>
- <li class="text-primary">Shipping & Billing<span class="chevron"></span></li>
- <li class="text-muted">Payment<span class="chevron"></span></li>
- <li class="text-muted">Confirmation<span class="chevron"></span></li>
- </ul>
- <h1>Your Address</h1>
- <form t-action="/shop/confirm_order/" method="post">
-
- <div class="row">
- <div class="col-md-8 oe_mycart">
- <h3 class="page-header mt16">Set Billing Information
- <small t-if="user_id.id == website.public_user.id"> or
- <a t-if="not partner" t-attf-href="/web#action=redirect&url=#{ request.httprequest.host_url }/shop/checkout/">sign in</a>
- </small>
- </h3>
- <div class="row">
- <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''} col-lg-6">
- <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('company') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="company" style="font-weight: normal">Your Company</label>
- <input type="text" name="company" class="form-control" t-att-value="checkout.get('company')"/>
- </div>
- <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="contact_name">Email</label>
- <input type="email" name="email" class="form-control" t-att-value="checkout.get('email')"/>
- </div>
- <div t-attf-class="form-group #{ error.get('phone') and 'has-error' or ''} col-lg-6">
- <label class="control-label" for="phone">Telephone</label>
- <input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone')"/>
- </div>
+ </ul>
+ </xpath>
+ <xpath expr="//div[@id='products_grid_before']" position="attributes">
+ <attribute name="class">col-md-3 hidden-xs</attribute>
+ </xpath>
+ <xpath expr="//div[@id='products_grid']" position="attributes">
+ <attribute name="class">col-md-9</attribute>
+ </xpath>
+</template>
+
+<template id="products_attributes" inherit_option_id="website_sale.products" name="Product Filters and Attributes">
+ <xpath expr="//div[@id='products_grid_before']" position="inside">
+ <form t-action="/shop/filters/" method="post" t-keep-query="category,search">
+ <ul class="nav nav-pills nav-stacked mt16">
+ <t t-set="attribute_ids" t-value="Ecommerce.get_attribute_ids()"/>
+ <t t-foreach="attribute_ids" t-as="attribute_id">
+ <t t-if="attribute_id.visible">
+ <li t-if="attribute_id.value_ids and attribute_id.type == 'distinct'">
+ <div t-field="attribute_id.name"/>
+ <ul class="nav nav-pills nav-stacked">
+ <t t-foreach="attribute_id.value_ids" t-as="value_id">
+ <li t-att-class="Ecommerce.has_search_filter(attribute_id.id, value_id.id) and 'active' or ''">
+ <label style="margin: 0 20px;">
+ <input type="checkbox" t-att-name="'att-%s-%s' % (attribute_id.id, value_id.id)"
+ t-att-checked="Ecommerce.has_search_filter(attribute_id.id, value_id.id) and 'checked' or ''"/>
+ <span style="font-weight: normal" t-field="value_id.name"/>
+ </label>
+ </li>
+ </t>
+ </ul>
+ </li>
+ <li t-if="attribute_id.type == 'float' and attribute_id.float_min != attribute_id.float_max">
+ <div t-field="attribute_id.name"/>
+ <t t-set="attribute" t-value="Ecommerce.has_search_filter(attribute_id.id)"/>
+ <div style="margin: 0 20px;" class="js_slider"
+ t-att-data-id="attribute_id.id"
+ t-att-data-value-min="attribute and attribute[1][0] or attribute_id.float_min"
+ t-att-data-value-max="attribute and attribute[1][1] or attribute_id.float_max"
+ t-att-data-min="attribute_id.float_min"
+ t-att-data-max="attribute_id.float_max"></div>
+ </li>
+ </t>
+ </t>
+ </ul>
+ <button class="btn btn-xs btn-primary mt16">Apply filter</button>
+ <a t-href="/shop/" t-keep-query="category,search" class="btn btn-xs btn-default mt16">Cancel filter</a>
+ </form>
+ </xpath>
+ <xpath expr="//div[@id='products_grid_before']" position="attributes">
+ <attribute name="class">col-md-3 hidden-xs</attribute>
+ </xpath>
+ <xpath expr="//div[@id='products_grid']" position="attributes">
+ <attribute name="class">col-md-9</attribute>
+ </xpath>
+</template>
+
+<template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in my cart">
+ <xpath expr="//table[@id='mycart_products']" position="after">
+ <table t-if="suggested_products" class='table table-striped table-condensed'>
+ <colgroup>
+ <col width="80"/>
+ <col/>
+ <col width="100"/>
+ <col width="120"/>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="2">Suggested products</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="suggested_products" t-as="product">
+
+ <td>
+ <a t-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-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>
+ <span t-field="product.lst_price" t-field-options='{
+ "widget": "monetary",
+ "display_currency": "website.pricelist_id.currency_id"
+ }'/>
+ </td>
+ <td class="text-center">
+ <a t-href="./add_cart/#{ product.id }/"><strong>Add to Cart</strong></a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </xpath>
+</template>
+
+<template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code">
+ <xpath expr="//div[@id='right_column']" position="inside">
+ <h4>Coupon Code</h4>
+ <p>
+ Have a coupon code? Fill in this field and apply.
+ </p>
+ <form t-if="website_sale_order and website_sale_order.order_line" action="/shop/mycart/" method="post" class="mb32">
+ <div class="input-group">
+ <input name="promo" class='form-control' type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
+ <div class="input-group-btn">
+ <button class="btn btn-default">Apply</button>
+ </div>
+ </div>
+ </form>
+ </xpath>
+</template>
+
+
+<!-- Page confirm my cart -->
+
+<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">
+ <ul class="wizard pull-right">
+ <li><a href="/shop/mycart" class="text-success">Review Order<span class="chevron"></span></a></li>
+ <li class="text-primary">Shipping & Billing<span class="chevron"></span></li>
+ <li class="text-muted">Payment<span class="chevron"></span></li>
+ <li class="text-muted">Confirmation<span class="chevron"></span></li>
+ </ul>
+ <h1>Your Address</h1>
+ <form action="/shop/confirm_order/" method="post">