diff --git a/addons/website/views/views.xml b/addons/website/views/views.xml index fb9ba1712db..9122259bb2d 100644 --- a/addons/website/views/views.xml +++ b/addons/website/views/views.xml @@ -3,6 +3,60 @@ --> + + customer + qweb + +
+
+ + +
+
+
+
+ + + customer + qweb + +
+
+
+
Product and services
+ +
+
+
Social
+ +
+
+
Company name
+ +
+
+
+
+
+ layout qweb @@ -45,17 +99,7 @@
-
-
- - -
-
+
@@ -65,35 +109,7 @@
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 93faee68c0f..bef54124f86 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -188,8 +188,8 @@ class Ecommerce(http.Controller): def remove_cart(self, product_id=0): return self.add_cart(product_id=product_id, remove=True) - @http.route(['/shop/customer'], type='http', auth="admin") - def customer(self, *arg, **post): + @http.route(['/shop/checkout'], type='http', auth="admin") + def checkout(self, *arg, **post): cr, uid, partner_id = self.get_cr_uid() values = self.get_values() partner_obj = request.registry.get('res.partner') @@ -204,7 +204,7 @@ class Ecommerce(http.Controller): if partner_id: values['partner'] = partner_obj.browse(cr, uid, partner_id) - return request.registry.get("ir.ui.view").render(cr, uid, "website_sale.customer", values) + return request.registry.get("ir.ui.view").render(cr, uid, "website_sale.checkout", values) @http.route(['/shop/confirm_cart'], type='http', auth="admin") def confirm_cart(self, *arg, **post): diff --git a/addons/website_sale/static/src/css/ecommerce.css b/addons/website_sale/static/src/css/ecommerce.css index 3cdd2e63d9e..32b81db44a8 100644 --- a/addons/website_sale/static/src/css/ecommerce.css +++ b/addons/website_sale/static/src/css/ecommerce.css @@ -1,20 +1,3 @@ -.oe_ecommerce { - font-family: "Lato"; - font-size: 13px; -} -.oe_ecommerce input:not([type="radio"]):not([type="checkbox"]) { - height: 30px; -} -.oe_ecommerce label > input:not([type="radio"]):not([type="checkbox"]), .oe_ecommerce label > div { - display: block; - margin-top: 3px; -} -.oe_ecommerce label select { - margin-top: 3px; -} -.oe_ecommerce label > div > input { - margin-bottom: 0; -} .oe_ecommerce .oe_total { margin-top: 10px; } @@ -144,9 +127,6 @@ background: -o-linear-gradient(#51a351, #418541); background: linear-gradient(#51a351, #418541); } -.oe_ecommerce form.oe_signup { - display: none; -} .oe_ecommerce .oe_search form { width: 100%; margin: 24px; @@ -163,10 +143,20 @@ max-width: 64px; max-height: 64px; } -.oe_ecommerce .oe_checkout .accordion-inner { - padding: 9px; -} -.oe_ecommerce .oe_checkout .accordion-inner h4 { +.oe_ecommerce .oe_checkout h4 { border-bottom: 1px solid #dddddd; margin-right: 30px; } +.oe_ecommerce .oe_checkout input:not([type="radio"]):not([type="checkbox"]) { + height: 30px; +} +.oe_ecommerce .oe_checkout label > input:not([type="radio"]):not([type="checkbox"]), .oe_ecommerce .oe_checkout label > div { + display: block; + margin-top: 3px; +} +.oe_ecommerce .oe_checkout label select { + margin-top: 3px; +} +.oe_ecommerce .oe_checkout label > div > input { + margin-bottom: 0; +} diff --git a/addons/website_sale/static/src/css/ecommerce.sass b/addons/website_sale/static/src/css/ecommerce.sass index 1bcf6e12d1b..3dfc8cce1b8 100644 --- a/addons/website_sale/static/src/css/ecommerce.sass +++ b/addons/website_sale/static/src/css/ecommerce.sass @@ -2,22 +2,10 @@ .oe_ecommerce - input:not([type="radio"]):not([type="checkbox"]) - height: 30px - label - > input:not([type="radio"]):not([type="checkbox"]), > div - display: block - margin-top: 3px - select - margin-top: 3px - > div > input - margin-bottom: 0 .oe_total margin-top: 10px td padding: 5px 10px - font-family: "Lato" - font-size: 13px .oe_products .oe_product .oe_hidden @@ -104,8 +92,6 @@ @include background(linear-gradient(#0088cc,#0076b1)) &.btn-success @include background(linear-gradient(#51a351, #418541)) - form.oe_signup - display: none .oe_search form width: 100% @@ -122,8 +108,16 @@ max-width: 64px max-height: 64px .oe_checkout - .accordion-inner - padding: 9px - h4 - border-bottom: 1px solid #ddd - margin-right: 30px + h4 + border-bottom: 1px solid #ddd + margin-right: 30px + input:not([type="radio"]):not([type="checkbox"]) + height: 30px + label + > input:not([type="radio"]):not([type="checkbox"]), > div + display: block + margin-top: 3px + select + margin-top: 3px + > div > input + margin-bottom: 0 diff --git a/addons/website_sale/static/src/js/ecommerce.js b/addons/website_sale/static/src/js/ecommerce.js index 8d34fb95e57..92519fb9807 100644 --- a/addons/website_sale/static/src/js/ecommerce.js +++ b/addons/website_sale/static/src/js/ecommerce.js @@ -18,10 +18,6 @@ $(document).ready(function (){ $('.oe_ecommerce .oe_total').replaceWith(''+result.totalHTML); }); }); - $('.oe_ecommerce form').on('click', '.oe_toggleform', function (ev) { - ev.preventDefault(); - $('.oe_ecommerce form').toggle(); - }); }); @@ -34,8 +30,11 @@ openerp.website = function(instance) { 'click button[data-action=gotostep]': 'gotostep', }, start: function() { - console.log("instance.website.sale.Checkout", this); - return this._super.apply(this, arguments); + var self = this; + this._super.apply(this, arguments); + this.$('input[name="shipping_different"]').on('change', function (ev) { + self.$('.oe_shipping').toggle(); + }); }, goto: function (e) { @@ -62,5 +61,5 @@ $(document).ready(function () { instance.web.qweb.add_template('/website_sale/static/src/xml/ecommerce.xml'); var editor = new instance.website.sale.Checkout(instance.webclient); - editor.prependTo($('.oe_placeholder_checkout')); + editor.replace($('.oe_placeholder_checkout')); }); \ No newline at end of file diff --git a/addons/website_sale/static/src/xml/ecommerce.xml b/addons/website_sale/static/src/xml/ecommerce.xml index b4f47fef26f..94ba8cac95e 100644 --- a/addons/website_sale/static/src/xml/ecommerce.xml +++ b/addons/website_sale/static/src/xml/ecommerce.xml @@ -3,163 +3,35 @@
-
-
- -
-
-
-

Checkout as a Guest or Register

-

Register with us for future convenience:

-
- - -
-
Register and save time!
-

Register with us for future convenience:

-
    -
  • Fast and easy check out
  • -
  • Easy access to your order history and status
  • -
- -
-
-

Login

-
Already registered?
-

Please log in below:

- - - - -
-
-
-
-
- -
-
- - - - - - - - - - -
- - -
-
- -
-
-
-
-
- -
-
- - - - - - - - - -
- -
-
-
-
-
- -
-
-
- - -
-
- - - - - -
-
- -
-
-
-
-
- -
-
- Anim pariatur cliche... -
- -
-
-
-
+

Billing Information

+
+ + + + + + + + + + + + +
+ + +

Choose your payment

+
diff --git a/addons/website_sale/views/ecommerce.xml b/addons/website_sale/views/ecommerce.xml index ce0bbeb60dc..da8645ee68b 100644 --- a/addons/website_sale/views/ecommerce.xml +++ b/addons/website_sale/views/ecommerce.xml @@ -3,16 +3,24 @@ - - layout_ecommerce - + + header_ecommerce + - +
  • My cart
  • Shop
  • - +
    +
    +
    + + footer_ecommerce + + + + SHOP Footer @@ -186,7 +194,7 @@
    - + @@ -217,40 +225,15 @@ - - customer + + checkout qweb - Your informations + Checkout -
    -
    - - +
    oe_placeholder_checkout