andymoore Posted May 1, 2012 Share Posted May 1, 2012 Hello, This is my first post here so please be gentle with me and understand I'm a procedural code kinda guy so I'm not as OOP as many here. This is what I have: Totally independent domain registration / renewal suite of applications (includes account creation and a host of products I've got sync'd with PS) Digital Access Pass PrestaShop Within my totally independent domain applications I have a users table, upon new account creation I insert the user into this, into the DAP user tables and into the PrestaShop user tables too. All that is great and working. On my custom login application I'm using the DAP validate function to return true so I know if their credentials have passed the test, if so DAP them sets the cookies I use to check if they're logged in or not. In addition to this, when orders are placed they're submitted to PS through the web service and all that is working too. Sadly that's where the good news ends. Now this is where I'm hitting my head against a brick wall, if anyone can offer any enlightenment on this I'd be very grateful. How can I also log the user into PrestaShop at the same time. Or to word it another way: How do I log the user into PrestaShop from my independent application on the same server? Are there any examples please? (like real proper working ones) The two best things I've seen are http://www.nethercottconstructions.com/en/content/53-prestashop-cookie-structure and http://www.websitedesignconcepts.com/blog/integrating-prestashop-shopping-cart-with-existing-php-mysql-authentication/ and in all honesty both leave me thinking WTF.They both give me all the information I need and don't tell me a damn thing about what to do with it. I just want to pass an email address and a password to a function and have it log them in and drop the cookies so when I pass them to PrestaShop they're all logged in and good to go. I also need to reverse it to log the user out of everything too. Any advice would me much appreciated. Thanks Link to comment Share on other sites More sharing options...
CartExpert.net Posted May 2, 2012 Share Posted May 2, 2012 Hi, You have to include some of PrestaShop's files to your API or you could try resubmitting the page to PrestaShop too. If you use PrestaShop 1.4.7.3 you can check the login in 'controllers/AuthController.php' from line 226 to line 288 1 Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted May 3, 2012 Share Posted May 3, 2012 You should eat eat more cheese, then maybe your brain will have enough proteins to understand oo. 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted May 3, 2012 Share Posted May 3, 2012 Hi Elpatron. Well as we say "You can only lead the horse to water but not make it drink" 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