How can I build an application that works with nopCommerce?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
I have an existing application, and we need to add a cart to it.  This leads to a few questions:

What's the best way to integrate the look & feel?  I've done this, by modifying the Root Master file, and adding my own header/footer controls.  Is there a better way?

My application is using the ASP Membership Provider, but I want logins to be seamless, and I don't want to store duplicate info.  Any suggestions?

I'd like to take advantage of other features in the nopCommerce code in my application (eg: email code).  How can I do this?

Is there a "best practices" guide, that will let me make changes to the nopCommerce code, while reducing the risk of problems when upgrades come around?

Thanks, in advance, for any advice, links, code snippets, etc.
13 лет назад
Learned a bit over the weekend, hoping that I'm getting close to answer.

My main issue is sharing the membership system.  I have one in each, they both work, but I don't want duplicate data, and I don't want users logging in twice.

It seems the easiest way, is to dump my membership provider, and use the one built into nopCommerce.  My current guess on how to do this:

Copy appropriate dll from the store, into my app's bin dir.
Add a reference to the dll to my project.
Change the membership provider in my web.config to match the one from the store.
Add a SQL connection that points to the store's database, so my app can use it for authentication.

Is this correct?
Which dll would I need to copy?
Is there anything else I need to do?

Thanks, in advance.
13 лет назад
That would probably work. Easiest way to find out is to give it a try! :)

I wrote my own membership provider which uses the NopCommerce database because we had more complex needs. Just so long as all sites use the same auth cookie name and machine key it doesn't matter what provider is used, so I'm able to log users in on one site and then redirect them to Nop and keep them logged in if need be. Seems to be working very well in testing.
13 лет назад
Thanks much for the feedback!  I tried a few things, then wandered off to learn more about debugging.  You inspired me to try again.

Ok, so here's what I have so far...

I copied the NopSqlConnection from the ConnectionStrings.config, and dropped it in my apps <connectionStrings> block (this is important - due to my current error).

I copied the following DLL's into my project root dir, then added a reference to them, which put copies in my 'bin' dir (seemed an odd way to do it, but that's what was suggested on some forum).
Nop.BusinessLogic.dll (and .xml, just in case).
Nop.Common.dll
Nop.HttpModules.MembershipModule.dll

I used this site to generate a machineKey tag, and dropped the same tag into both web.config files (in the <system.web> block):
http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx

I copied the 'membership', and 'roleManager' blocks for the nop web.config, but kept my old names for them - figuring they're referenced in my code.

Based on your comments, and comments from other forums, I copied the <authentication> block from the nop web.config file.

You mentioned "use the same auth cookie name", but I don't see how to set that, and I think it may have been handled by some of the above.

While doing this, I got various errors, as I was missing one or another of these things.  Now I'm down to this error:
 The ConnectionString property has not been initialized.

edit: deleted relatively useless info

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


I'm stumped again, but I think I'm much closer now.  Any thoughts?

edit:
Can't thank you enough.  You've managed to answer my question in your sleep.

Oddly enough, a google search for the error found your recent post on the topic:
13 лет назад
Lol, and now your post has helped me find that thread again! What goes around etc :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.