Autologin in Prestashop

August 20, 2014 Alex Simonchik Prestashop
Autologin in Prestashop

Today we are glad to introduce to our community a new free module: «Belvg_AutoLogin». In future this module will help us demonstrate how our modules work. The idea of this module is that it allows users to test modules, which are installed on our demo-shops, without creating accounts.   Using the form, shown below, users can log into the demo-shop under a profile of some other user, who have already been registered in the system.

1Autologin in Prestashop

Here is the example – http://belvg.info/demo/prestashop16/deliveryandpayments/

 To make the user appear in the form, he should be recorded in the table belvg_autologin  and should also exist in the standard table ps_customer. The user can be added to the belvg_autologin table both manually and automatically.  The automatic mode is controlled by the property belvg_autologin::$default_customers:

It contains an array of users’ IDs, whose profiles we want to use to allow free logging into the system.

The authorization is controlled by the controller Belvg_AutoLoginDefaultModuleFrontController and its method prосessLоgin( ):

 

Here you can download free module.



1 comment

  1. Hi Alex.

    i fortunatly found your module. It is really great, and nearly exactly what I am looking for. Maybe with some small changes it can fit my needs.

    My target is to have a link that directs the customers automaticly logged in, to the product page.

    As far as I see, I only need to

    1. delete the module from the footer hook
    2. change the URL target, which actually always routes to the basket
    3. Having the autologin_ID to be something more cryptic

    What I would like to use is is to have the customers directed to the products he bought, to leave a comment.

    Do you think this could be made with some easy modifications?

    thx a lot for your answer

    regards

Post a new comment

top