wncdevelopment Posted May 4, 2010 Share Posted May 4, 2010 Hi, i need prestashop to save and load users from a separate database, which contains "customers" table.For that, i ve tried adding the name of that database to the sentences where "customers" table is used . Example (not real )select * from customers is now:select * from usersdb.customers where usersdb is the database we use for all customers. The problem is that the way i did it, i doesnt work. I need some advice from prestashop experts who can help me in this. I know its not simple but i really need that. I want that if you want to buy in any of my stores, you just make a single user from my website or any store in my store network and you can use it for buying in all that storesThanks in advance, i hope you can help me . Link to comment Share on other sites More sharing options...
Mattz Posted May 23, 2010 Share Posted May 23, 2010 Hi,Have you managed to do this ? I'm busy form time to time also with this, the issue is the views up updates and so on... a "select" view is kinda simple... now the rest. Link to comment Share on other sites More sharing options...
wncdevelopment Posted May 23, 2010 Author Share Posted May 23, 2010 Hi,Have you managed to do this ? I'm busy form time to time also with this, the issue is the views up updates and so on... a "select" view is kinda simple... now the rest. The only solution i found was moving my project into opencart ecommerce. Prestashop was too complex (or impossible, we tried really hard, with a friend and we couldnt make it work) to modify that part, opencart in the other hand was perfect for what we need. It doesnt have too much templates, modules, etc, but the basics are great. Sorry for not closing this thread before, ive been busy and forgot to do it . With OC now i have treee databases with different data, for example i have users in one, categories in another (not implemented yet, because i didnt have that idea when i started the project) and a third database for each site containing all specific data for the store (config, prods, etc) Link to comment Share on other sites More sharing options...
Mattz Posted May 24, 2010 Share Posted May 24, 2010 We need to post some view queries here and things are solved for most people.Maybe someone else can helpout with the update and insert query's Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 24, 2010 Share Posted May 24, 2010 The proper way to do is to create a view in the database. You create a view that points to the other table. You first need to delete the customer table on the second installation, and create a view with the same name pointing to the customer table in the first installation. Check this:http://dev.mysql.com/doc/refman/5.0/en/create-view.html Link to comment Share on other sites More sharing options...
Mattz Posted May 24, 2010 Share Posted May 24, 2010 The proper way to do is to create a view in the database. You create a view that points to the other table. You first need to delete the customer table on the second installation, and create a view with the same name pointing to the customer table in the first installation. Check this:http://dev.mysql.com/doc/refman/5.0/en/create-view.html I have done that, works great for login but I was stuck on insert a new one or updating a user....So any help on that would be nice! Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 24, 2010 Share Posted May 24, 2010 You have to make sure the view is update able:http://dev.mysql.com/doc/refman/5.0/en/view-updatability.htmlAlso you might have to do this for other tables, like address. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now