[MERGE] Merged lp:~openerp-dev/openobject-addons/trunk-website-bootstrap-3.0-bth
authorParamjit Singh Sahota <psa@tinyerp.com>
Mon, 26 Aug 2013 06:19:42 +0000 (11:49 +0530)
committerParamjit Singh Sahota <psa@tinyerp.com>
Mon, 26 Aug 2013 06:19:42 +0000 (11:49 +0530)
bzr revid: psa@tinyerp.com-20130826061942-dr9m4iv3jvtl77ib

1  2 
addons/website_sale/views/website_sale.xml

                  <div id="product_detail">
                      <t t-call="website.publish"><t t-set="object" t-value="product"/></t>
                      <h2 t-field="product.name"></h2>
-                     <a t-if="not product.product_variant_ids" t-attf-href="/shop/add_cart/#{ product.id }/" class="btn btn-default btn-small btn-success pull-right">Add to cart</a>
-                     <form t-if="len(product.product_variant_ids) > 1" action="/shop/add_cart/" class="pull-right">
 -                    <a t-if="not product.product_variant_ids" t-attf-href="./add_cart/#{ product.id }/" class="btn btn-small btn-success pull-right">Add to cart</a>
++                    <a t-if="not product.product_variant_ids" t-attf-href="./add_cart/#{ product.id }/" class="btn btn-default btn-small btn-success pull-right">Add to cart</a>
+                     <form t-if="len(product.product_variant_ids) > 1" action="./add_cart/" class="pull-right">
 -                        <label class="radio" t-foreach="product.product_variant_ids" t-as="product">
 -                            <input type="radio" name="product_id" t-att-value="product.id" t-att-checked="product == product.product_variant_ids[0] or None"/>
 +                        <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="product">
 +                            <input type="radio" name="product_id" t-att-value="product.id" t-att-checked="product == product.product_variant_ids[0] or None" />
                              <t t-esc="product.variants or ''">Standard</t>
                              <span class="badge" t-if="product.price_extra"><t t-esc="product.price_extra > 0 and '+' or ''"/><t t-esc="product.price_extra"/> €</span>
 -                        </label><br/>
 -                        <button class="btn btn-small btn-success">Add to cart</button>
 +                        </label></br>
 +                        <button class="btn btn-default btn-small btn-success">Add to cart</button>
                      </form>
-                     <img class="media-object" t-att-src="product.img('image')"/>
+                     <img class="media-object" t-att-src="product.img('image_medium')"/>
                      <div t-field="product.website_description"></div>
                      <div>
                          <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
                              <col width="160"/>
                          </colgroup>
                          <thead>
-                             <tr> <th colspan="3">Subtotal </th>      <th><t t-esc="order.amount_untaxed"/> €</th></tr>
-                             <tr> <th colspan="3">Taxes </th>         <th><t t-esc="order.amount_tax"/> €</th></tr>
-                             <tr> <th colspan="3"><h4>Total</h4></th> <th><h4><t t-esc="order.amount_total"/> €</h4></th></tr>
+                             <tr> <th colspan="3">Subtotal </th>      <th><t t-esc="order and order.amount_untaxed or 0"/> €</th></tr>
+                             <tr> <th colspan="3">Taxes </th>         <th><t t-esc="order and order.amount_tax or 0"/> €</th></tr>
+                             <tr> <th colspan="3"><h4>Total</h4></th> <th><h4><t t-esc="order and order.amount_total or 0"/> €</h4></th></tr>
                          </thead>
                      </table>
-                     <a t-if="order.order_line" href="/shop/checkout/" class="btn btn-default btn-success">Proceed To Payment</a>
 -                    <a t-if="order and order.order_line" href="/shop/checkout/" class="btn btn-success">Proceed To Payment</a>
++                    <a t-if="order and order.order_line" href="/shop/checkout/" class="btn btn-default btn-success">Proceed To Payment</a>
                  </div>
              </t>
          </t>
              <t t-set="title">Shop - Payment</t>
              <div class="container mt48 oe_website_sale">
                  <div class="row">
 -                    <div class="span4">
 +                    <div class="col-md-4">
-                         <table class="table table-condensed">
+                         <table class="table table-condensed" t-if="order">
                              <thead>
                                  <tr>
                                      <th>Product</th>