sparky82 Posted September 29, 2011 Posted September 29, 2011 Hi, I have got 2 oscommerce stores setup in subfolders on a domain, www.mydomain.com/store1 and www.mydomain.com/store2. They each have their own database. I need to have the same customer/user database for both stores so that customers do not have to create another account at the other store, and also do not have to login again if they choose to go to the other store (each store sells different products, this is for a franchise, so same branding, but each store has different products available). In order to achieve this, I used the following contribution: http://www.oscommerce.com/community/contributions,5510/page,55 I created another database called 'users' as per the contribution above, and imported the following tables:address_bookcustomercustomer_infosessions whos_online table I then edited the relevant database_table.php files in the two stores to point to these tables in the new database. The two databases for the stores and the new users database are accessed by the same user credentials which are set in configure.php It all seems to be working fine, the same user database is used for both stores. The problem I have is that when a user switches stores (click on a simple url link), the store they are switching to does not recognise that the user is already logged in on the other store and the user has to login again to see things like the 'my account' page. I thought that this would be due to the sessions, hence why I moved the sessions table to the new 'users' database but no joy. I have searched around but not found anything on how the login works. Can anyone shed any light on this and how I would go about achieving my goal of having two stores that are independent (separate admin panels, databases etc) but using the same customer database and carrying the login status between stores? Do I have to do something with cookies? Am I even on the right track? Thanks in advance for your help!
sparky82 Posted October 3, 2011 Author Posted October 3, 2011 Hi all, Just bumping this thread. Does anybody have an idea on how to do this? Any help is much appreciated! Thanks
Carbon_Fibre Posted October 22, 2011 Posted October 22, 2011 Hi all, Just bumping this thread. Does anybody have an idea on how to do this? Any help is much appreciated! Thanks Hi Sparky82 I am also trying to use the same add-on Multiple Stores, 1 User Account for all (http://www.oscommerc...ns,5510/page,55). Where did you specify the database username and password for the users database? I get this error: 1142 - SELECT command denied to user 'username'@'server43.jnb2.host-h.net' for table 'customers' select count(*) as total from users.customers where customers_email_address = '[email protected]' [TEP STOP] This is my thread. http://forums.oscomm...e-registration/ Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.