Sitefinity integration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Hi, i want to try to integrate the user login provider of Sitenity with the current provider at nopCommerce.

Its like this:

I have a domain, www.company.com that displays all the data about the company, including the user login provider wich is from Sitefinity.

What i want is to once the user already log in to our web site at www.company.com with Sitefinity, he can go to store.company.com and start adding items to the cart, with the user data he entered before.
14 years ago
I can share some thoughts on how I would approach this:

Both Sitefinity and NopCommerce use custom membership providers. Since providers are pluggable, you might be able to substitute one with the other. I haven't tried this, so I don't know what issues you may encounter.

You can also recognize the Sitefinity membership provider from the NopCommerce codebase, by adding it as a secondary membership provider in web.config. From code you can then access the alternate provide via Membership.Providers[sitefinityProviderName].GetUser.

You’ll also need to modify the default domain of the membership cookie that is generated, because the default includes the “www” sub-domain. By changing the domain to just “company.com” the cookie will be applied to both “www.company.com” and “store.company.com”. You need to do this step regardless of whether you take this approach, or attempt to share a single provider.

Within NopCommerce, you’ll want to remove access to the register / login page, and intercept the redirect for authentication to some code that you need to write. That code will read the Sitefinity user profile, look it up in NopCommerce, create a new customer if one doesn’t exist (or update if you want to republish common profile information), and then silently login the user to NopCommerce. Note that you won’t be able to retrieve the password from Sitefinity, but it won’t matter. You can use a fixed password when creating the user in NopCommerce since you’ve removed all access to the authentication mechanism except through your own custom code.

Hope this helps a little.

Gary
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.