Currently we have a Woocommerce installation in development. We need to modify the registry customer system of this woocommerce to integrate it with a external currently working DB (external proprietary CRM, not related with wordpress and that uses his own database in SQL server with table named ‘USERS’ on it.
We want this database the main database for user/customers and that database from woocommerce is synchronized with this one for the ecommerce workflow normally.
1- Replace register page in woocommerce with our main register form. This register goes to our main DB user table (named USERS), and all data is stored in there. Our register form is the unique way to fill the data user in both systems. So when user registries in OUR database, it has to be also created in woocommerce DB tables.
We have already created a column named ‘woocommerce_id’ on our USERS table for to store the final id assigned to the user when inserted also in Woocommmerce tables.
We must have a way to unequivocally correlate both.
So there has to be also a column in user table on Woocommerce DB. A column for to store the user_id value assigned in our database has to be added to table and filled with correspondant value when new register is done. This column is still not created on woocommerce tables and to create it is a point of the task.
2- Login for the user in both sides has to be ‘the same’ (password and user_name is the same, and when is changed on one of the two DB using the user settings page, it has to change in both sides).
3- For to change user settings, it has to be in our form and simultaneously store values in both databases keeping the values synchronized.
The idea is to use API REST from woocommerce to get this synchronization
or in other case and If developer finds it is not possible, then use direct code insertion in DB (remember that we replace original register form of woocommerce with our own user registry form that already inserts customer into our own users database).
Concrete points to achieve:
1- Make that the form for a new user profile in woocommerce points to our user admin form to create a new user in DB. Currently woocommerce only shows login page, developer has to add the link to our own registry page.
Check that all values are also stored in our platform side and woocommerce side (using API).
And check that we have the columns that point from one to another in order to identify the user correctly.
For this point, user creation form will be available in virtual machine.
2- Manage a way that can be a user token, cookies, post parameters via petition or API in woocommerce to automatically log in a user in the woocommerce when the user comes identified and logged in from the website. This means in essence, that login in one of the sides must then be transparent to be applied on the other side.
For this point, login form for user currently used in our platform will be also available in virtual machine.
Delivering must include:
-All code files for to import project and to have more modifications on it in later tasks.
-A briefing document (guide) with main points of configuration (where to configure database connection and similar if needed)