cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong access to customres not from the main website

Wrong access to customres not from the main website

Hi. I'm new with Comunity Magento 2.0.2 and I have one doubt about to how to set properly the configuration for my use case

 

This is my scenario:

- I have customers who belong to a company

- I want to show differents products and prices to them based on his company

- Also I want to have a public store to show the public products

 

I have search in the documentation and I found that one aproach could be based on website, so I created one website for each different company.

 

Now I have this structure

Website Store Storeview

Public Public English

Company A Company A English

Company B Company B English

 

I have created a few test customers and assign them to different websites. I get this error

Invalid login or password.

 

The problem is when I try to make login with them. I think it's because they need to perform the login in an url that identifies them into a store because users from the default Website works fine

 

What I try

- Perform a reset password. I get this url /customer/account/createpassword/ but when type the new password I get Something went wrong while saving the new password.

- In the global configuration set to true the "Add the store code to the url."  but I get the same error in both ways

 

Could you please point me in the right direction of what I'm doing wrong? 

 

Thanks very much and sorry for my english

 

 

 

 

 

 

 

 

 

 

 

 

1 REPLY 1

Re: Wrong access to customres not from the main website

Hi. I fixed this problem creating a module with a plugin to replace the login method. In this plugin I search through all the websites and try to authenticate my customer. If one website succeded, then redirect the user to that store

 

To perform authentication I based on this work:

http://magefan.com/login-as-customer-magento-2-extension/

 

Regards!