I have a nopCommerce store and need to be able to us the stores membership provider within Umbraco. I have setup the web.config with the nopcommerce connection string, membership provider, and role provider. I also copied the Nop.BusinessLogic.dll and Nop.Common.dll files to the Umbraco bin.
I am able to login to the backoffice normally, but can not browser nopCommerce members in the Members section.
When I select a letter node, I get this error:
[NotImplementedException: The method or operation is not implemented.]
NopSolutions.NopCommerce.BusinessLogic.Profile.StoreMembershipProvider.FindUsersByName(String usernameToMatch, Int32 pageIndex, Int32 pageSize, Int32& totalRecords) +55
The nopCommerce membership provider does, in fact, implement the FindUserByName method.
I receive similar errors when trying to add a user or role and when trying to secure a content node. (other methods not implemented errors)
Am I missing a step here? Any help would be appreciated.
The reason for the error is because the nopCommerce role provider does not fully implement the provider interface, more specificaly, the GetAllRoles method.
Best thing to do would be to create a custom provider which extends the nopCommerce provider, and implements this method:
public class StoreRoleProvider : NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider
{
public override string[] GetAllRoles()
{
var roles = new List<string>();
if (InstallerHelper.ConnectionStringIsSet())
{
foreach(CustomerRole role in CustomerManager.GetAllCustomerRoles())
{
roles.Add(role.Name);
}
}
return roles.ToArray();
}
}
This should then allow you to display the roles within the admin, and also let you use them for setting permissions, however you won't be able to create new roles in the members section as the nopCommerce roles hold more information than the Umbraco interface allows you to set, so you'll have to do this within the nopCommerce UI.
Hi Matt - I'm looking at a project where I'll need to implement these 2 systems. Just wondering if your implementation of Umbraco & nopCommerce would run on SQL Server Express?
Using nopCommerce Membership Provider in Umbraco
I have a nopCommerce store and need to be able to us the stores membership provider within Umbraco. I have setup the web.config with the nopcommerce connection string, membership provider, and role provider. I also copied the Nop.BusinessLogic.dll and Nop.Common.dll files to the Umbraco bin.
I am able to login to the backoffice normally, but can not browser nopCommerce members in the Members section.
When I select a letter node, I get this error:
Hi Daniel,
Have you solve your problem?
I am trying to do same thing..
Could you please give me some idea how to solve it?
Thanks
shah
No solution.. I gave up on it for the time being.
The reason for the error is because the nopCommerce role provider does not fully implement the provider interface, more specificaly, the GetAllRoles method.
Best thing to do would be to create a custom provider which extends the nopCommerce provider, and implements this method:
This should then allow you to display the roles within the admin, and also let you use them for setting permissions, however you won't be able to create new roles in the members section as the nopCommerce roles hold more information than the Umbraco interface allows you to set, so you'll have to do this within the nopCommerce UI.
Matt
FYI, I've just blogged about my Umbraco + nopCommerce session at UmbUKFest which includes a download of my examples project.
http://blog.mattbrailsford.com/2010/11/04/integrating-3rd-party-systems-with-umbraco-umbraco-nopcommerce/
Matt
Hi Matt - I'm looking at a project where I'll need to implement these 2 systems. Just wondering if your implementation of Umbraco & nopCommerce would run on SQL Server Express?
Hey,
It would indeed as I only ever run off SQL Express so that's what my demo would have been on.
Cheers
Matt
Hey Daniel
Wanna take a look at working on a new energy conservation project with us - pays well, long run project if interested ? All the best, Tom
is working on a reply...