Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Bardi 927 posts 2562 karma points
    Aug 20, 2010 @ 12:21
    Daniel Bardi
    0

    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:

     

    [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. 

     

  • shahidul 12 posts 32 karma points
    Nov 04, 2010 @ 02:25
    shahidul
    0

    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

  • Daniel Bardi 927 posts 2562 karma points
    Nov 04, 2010 @ 07:15
    Daniel Bardi
    0

    No solution.. I gave up on it for the time being.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Nov 04, 2010 @ 09:40
    Matt Brailsford
    0

    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.

    Matt

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Nov 04, 2010 @ 23:01
    Matt Brailsford
    0

    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

  • jonok 297 posts 658 karma points
    Aug 21, 2011 @ 23:25
    jonok
    0

    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?

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Aug 22, 2011 @ 09:46
    Matt Brailsford
    0

    Hey,

    It would indeed as I only ever run off SQL Express so that's what my demo would have been on.

    Cheers

    Matt

  • Tom Rosser 1 post 21 karma points
    Aug 31, 2011 @ 03:36
    Tom Rosser
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft