diff --git a/app/views/shop/_messages.html.haml b/app/views/shop/_messages.html.haml index 8debaff82e..dd736258cb 100644 --- a/app/views/shop/_messages.html.haml +++ b/app/views/shop/_messages.html.haml @@ -7,7 +7,9 @@ - if spree_current_user.nil? = t '.require_login_html', {login: ('' + t('.login') + '').html_safe, - register: ('' + t('.register') + '').html_safe} + signup: ('' + t('.signup') + '').html_safe, + contact: link_to(t('.contact'), '#contact'), + enterprise: current_distributor.name} - else = t '.require_customer_html', {contact: link_to(t('.contact'), '#contact'), diff --git a/config/locales/en.yml b/config/locales/en.yml index 981711ee56..75cc648e70 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1172,12 +1172,11 @@ en: shop: messages: login: "login" - register: "register" + signup: "signup" contact: "contact" - require_customer_login: "This shop is for customers only." - require_login_html: "Please %{login} if you have an account already. Otherwise, %{register} to become a customer." - require_customer_html: "Please %{contact} %{enterprise} to become a customer." - + require_customer_login: "Only approved customers can access this shop." + require_login_html: "If you're already an approved customer, %{login} or %{signup} to proceed. Want to start shopping here? Please %{contact} %{enterprise} and ask about joining." + require_customer_html: "If you'd like to start shopping here, please %{contact} %{enterprise} to ask about joining." # Front-end controller translations card_could_not_be_updated: Card could not be updated diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index cdbda93643..3c95fec9c2 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -462,8 +462,8 @@ feature "As a consumer I want to shop with a distributor", js: true do context "when not logged in" do it "tells us to login" do visit shop_path - expect(page).to have_content "This shop is for customers only." - expect(page).to have_content "Please login" + expect(page).to have_content "Only approved customers can access this shop." + expect(page).to have_content "login or signup" expect(page).to have_no_content product.name end end @@ -479,8 +479,8 @@ feature "As a consumer I want to shop with a distributor", js: true do context "as non-customer" do it "tells us to contact enterprise" do visit shop_path - expect(page).to have_content "This shop is for customers only." - expect(page).to have_content "Please contact #{distributor.name}" + expect(page).to have_content "Only approved customers can access this shop." + expect(page).to have_content "please contact #{distributor.name}" expect(page).to have_no_content product.name end end