From 3fcaf9147a5a903739408c352370a26dac49ccde Mon Sep 17 00:00:00 2001 From: eLBati Date: Mon, 1 Oct 2018 14:33:54 +0200 Subject: [PATCH] IMP website_sale_suggest_create_account buttons cleanup: Always show 'Process Checkout', not highlighted if user not logged in Suggest to login or signup, according to 'invitation_scope', avoiding too many buttons in cart page --- .../README.rst | 14 ++--------- .../readme/CONFIGURE.rst | 6 ----- .../readme/DESCRIPTION.rst | 4 +-- .../views/website_sale.xml | 25 ++++++++----------- 4 files changed, 14 insertions(+), 35 deletions(-) delete mode 100644 website_sale_suggest_create_account/readme/CONFIGURE.rst diff --git a/website_sale_suggest_create_account/README.rst b/website_sale_suggest_create_account/README.rst index ca015f2fa2..c900cd5bbc 100644 --- a/website_sale_suggest_create_account/README.rst +++ b/website_sale_suggest_create_account/README.rst @@ -28,24 +28,14 @@ the buyer to log in or create an account, but without forcing him to do it. This way you can avoid duplication of partners in your database and offer your users a better experience without blocking 1-time buyers. -However, the *Checkout without sign in* button is not highlighted, to -implicitly encourage users to create the account. +However, the *Process Checkout* button is not highlighted, to +implicitly encourage users to create the account or log in. **Table of contents** .. contents:: :local: -Configuration -============= - -To configure this module, you need to: - -* *Settings > Configuration > General Settings* and enable *Allow external - users to sign up*. - -Otherwise you will notice no change after installing this module. - Usage ===== diff --git a/website_sale_suggest_create_account/readme/CONFIGURE.rst b/website_sale_suggest_create_account/readme/CONFIGURE.rst deleted file mode 100644 index 983b7570d6..0000000000 --- a/website_sale_suggest_create_account/readme/CONFIGURE.rst +++ /dev/null @@ -1,6 +0,0 @@ -To configure this module, you need to: - -* *Settings > Configuration > General Settings* and enable *Allow external - users to sign up*. - -Otherwise you will notice no change after installing this module. diff --git a/website_sale_suggest_create_account/readme/DESCRIPTION.rst b/website_sale_suggest_create_account/readme/DESCRIPTION.rst index 9f47fa9465..978c79bbdd 100644 --- a/website_sale_suggest_create_account/readme/DESCRIPTION.rst +++ b/website_sale_suggest_create_account/readme/DESCRIPTION.rst @@ -4,5 +4,5 @@ the buyer to log in or create an account, but without forcing him to do it. This way you can avoid duplication of partners in your database and offer your users a better experience without blocking 1-time buyers. -However, the *Checkout without sign in* button is not highlighted, to -implicitly encourage users to create the account. +However, the *Process Checkout* button is not highlighted, to +implicitly encourage users to create the account or log in. diff --git a/website_sale_suggest_create_account/views/website_sale.xml b/website_sale_suggest_create_account/views/website_sale.xml index e97fb0fde3..0bff58b91d 100644 --- a/website_sale_suggest_create_account/views/website_sale.xml +++ b/website_sale_suggest_create_account/views/website_sale.xml @@ -8,17 +8,19 @@ website_sale_order.website_order_line"/> + - (user_authenticated or not signup_allowed) and can_checkout + + #{'btn btn-primary float-right d-none d-xl-inline-block' if user_authenticated else 'btn btn-default float-right d-none d-xl-inline-block'} - Log in and checkout @@ -30,18 +32,16 @@ Sign up and checkout - - Checkout without sign up - - (user_authenticated or not signup_allowed) and can_checkout + + #{'btn btn-primary float-right' if user_authenticated else 'btn btn-default float-right'} - Log in and checkout @@ -53,9 +53,6 @@ Sign up and checkout - - Checkout without sign up - @@ -64,10 +61,11 @@