Get Free Audit

Autologin in Prestashop

Aug 20, 2014

2034 Alex Simonchik

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

 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.

ecommerce development

Ecommerce Development

Take your online store to the next level with BelVG ecommerce development

Visit the page

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

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey


Looking for a reliable PrestaShop development partner? Turn to BelVG!

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

7 Comments

  1. Hi, Silvio

    Our blog post is about the way to login customer at the frontend, not the Webservice (API)
    If you are looking to create a new webservice method for working with customer data, you should provide a way to pass the customer_id or other customer params to determine/create a customer.

  2. please how can i use it?
    i,ve code a webservice with all code with cart and everymore… bute i have to make a login before it… how your code can help-me???

  3. Hi, Renato!

    …as soon as I add a product to the cart, I am logged-in

    Yes, we made this changes especially for demo to make customer’s live easier.

    To implement the same feature on your end we should know what exactly product should be added. It takes about 1 hour of support. Please contact us for further details https://belvg.com/contact

    Kindly,
    Alex

  4. Hello,
    I am trying to setup an auto-login in my prestashop.

    Your module seems to be very interesting and could feet my needs with minor changes.
    But, the module I installed from the ZIP file have a different behavior from the one we can test online.
    In the example you provide (http://belvg.info/demo/prestashop16/deliveryandpayments/), as soon as I add a product to the cart, I am logged-in. But with the ZIP file I have to click on the “Log In” at the bottom of the page.

    Is there a difference between the example and the zip file or do you believe it is due to a configuration on my side ?
    I would help me to search in the right direction.

    Thanks,
    Renato

  5. thank you for this great free Modul. It works perfect in 1.6.1.15
    I use it for one custumer who will show his wishlist to other without giving to much information.
    I unhookt the login from the footer and gave just the link to the login.
    With the different options at the end of the php it was easy to redirect the visitor to the wishlist.

  6. 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

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *