Jump to content

Login sync between suite of apps and PrestaShop


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...