How to use nopCommerce with existing User system?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anos atrás
Hi,

We plan on developing eCommerce using nopCommerce based on existing User system. That means we'd like to avoid any duplication of Customer data being saved into both of nopCommerce DB and our already existing DB. Prefer to use already existing one though. I looked into the source code and the developer's guide as well for a couple of days. Also searched for any topics described about that in the forum but couldn't find the right answer.

So my questions are
- Can someone please let me know if that will involve a heavy work?
- If no, what is the best way to getting this work?

Thanks
2 anos atrás
Not so much dificult task. May be need 1-2 week to do that. There is a scheduled task at nopCommerce. Using that you can sync customer related table from your existing system to nopCommerce system on a schedule basis. Make api endpoint to your existing system and call that endpoint from nopCommerce
2 anos atrás
Thanks for the answer, Rashed!

As you mentioned, synchronization on scheduled task should work definitely. But we don't want to save every fields defined in Customer model into the nopCommerce DB.  What we would expect is to save Customer data in our DB only.

For example, let's say a Customer filled out registration form in Register page and submitted. nopCommerce will then try to save form data into the DB - This is what we are going to skip. Instead of the data being saved in nopCommerce DB, we would like to save it into our existing DB only running on difference SQL server and use it whenever needed.

Will above scenario break overall nopCommerce workflow?
2 anos atrás
jinweiri wrote:
Will above scenario break overall nopCommerce workflow?

There are a lot of calls to get Customer profile, details and attributes spread through the complete application. Plus the customer data set is not stored just in one table.

You will need to change the core code to either call an SQL Database procedure or call some sort of Api function to return the data required each time a piece is required.

The Customer data is also Cached so I am not sure how well it will work – maybe you should expect some performance degradation. My thoughts are that you would probably need to have a very good reason to undertake the changes you propose.

What’s is the other database used for. Maybe it is better to turn it around and use nopCommerce as the primary system then replicate data into your other database to use for other non-total-live purposes ?
2 anos atrás
Thanks for your prompt response, Yidna!

We have several systems running on top of existing DB and they are pretty working well. We would like to avoid duplication of the customer data between the nop DB and the existing one.

Could you give me an idea of what fields in Customer and related tables like Address are being frequently used throughout the entire nopCommerce project?

We might consider to save some fields into the nop DB if they are crucial but not all fields.

Thanks again!
2 anos atrás
Depending on what can change and how often in your other databases ?
I guess it will take some though but maybe it’s doable and not such a big issue ???

I suppose I am referring to the notion "is the customer still a customer" – are they active, what is the current address Id’s and other data are stored in the Customer record. So calls like
            
var customer = await _workContext.GetCurrentCustomerAsync();

Which is called very very often – Here the customer record is loaded up and into cache when a customer becomes current - until the current customer record changes  and the values cleared from the cache to be read in again on the next call.

So providing the linked details are not changed in your other databases very often maybe no need to continually refresh the data across into nopCommerce.

Of course there are a lot of Async operations taking place in the background which use these customer details.

Then there are Customer attributes like First and Last Name, DOB, etc are stored in another table called GenericAttribute table
As you have said addresses in the Address table
Customer Roles linking to ACL in the CustomerRole and CustomerRole Mapping Table  

Maybe if the data set is greatly reduced down to things that don’t change much and replicated often then maybe it can work that way.

Sorry this are only my brief thoughts - certainly will take a bit more understanding, and time and playing around to check out the best way to do it 😊
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.