Hi, I'm a new .Net developer trying to customize nopcommerce for clients. I'm really enjoying learning the ins and outs of nopcommerce so far.
Frequently I've been able to overcome issues by searching these forums, but no such luck so far on this.
I want to create a specialized registration page that works almost identical to Register.aspx (using the CustomerRegister.ascx user control).
Once a user registers on this custom page, I want them to be automatically added to a customer role once they are created as a new customer (the customer role is Wholesalers and I've already created it in the admin backend).
I know that this information is stored in the CustomerRole_Mapping table in the database, but I'm at a loss as to how to update/add to this table in the code behind.
At first I tried:
string customerUserName = customer.Username;
Roles.AddUserToRole(customerUserName, "Wholesalers");
but the AddUserToRole method isn't implemented :(
I'm using version 1.90 by the way.
Any ideas?