Jump to content

Recommended Posts

Hi, 
Did you try to download it from the github link?


The green button then "Download Zip". When you then downloaded it, RENAME the zip file to "loginascustomer".
Then upload/install the module like any other module.

Share this post


Link to post
Share on other sites
On 10/5/2019 at 12:21 PM, jgk-dk said:

Thank you very much for your answer but what do I need it for.

Your module don't work why not just solve it?

It works fine on 1.7.6.1 and if you do not want to upgrade, fix it by yourself. It is free module, remember.

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 4 weeks later...
On 11/25/2019 at 5:35 PM, azzchemoto said:

Many thanks for your module but i cannot install on Prestashop 1.7.6.1.

I receive this msg

Ooops ... Loading failed.
What happened?
This file does not appear to be a valid zip module

Im using 1.7.5.1 also have the same problem.

I'm not able to upgrade to 1.7.6 due to the Php version. :(

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 1 month later...

The installation problem may be that when you download from Github you have two folder zipped.

The format may be -> Folder  -> Files (all module files with folders)

Probably you have -> Folder -> Folder -> Files (all module files with folders)

Try to zip the folder that contain all files and folder module and upload to your shop.

Edited by UGO decoración (see edit history)

Share this post


Link to post
Share on other sites
15 minutes ago, UGO decoración said:

The installation problem may be that when you download from hitbub you have two folder zipped.

The formar may be -> Folder  -> Files (all module files with folders)

Probably you have -> Folder -> Folder -> Files (all module files with folders)

Try to zip the folder that contain all files and folder module and upload to your shop.

You are correct, I've also just tested it on Prestashop 1.7.6.3 and it is working as expected.

For future reference to others, please use the releases page to download the module: https://github.com/rowanfuchs/PrestaShop-login-as-a-customer/releases

Share this post


Link to post
Share on other sites
  • 3 weeks later...

GDPR - Data Protection Regulation, what about this module?

Hi! We have installed this module on a spanish website. I don't know if you have to add something at "The Data Protection Act" (General Data Protection Regulation) of the website to inform the customer of this implementation? Because you are accessing to "personal data" about customer's purchases.

Thanks in advance!

 

Share this post


Link to post
Share on other sites
On 2/28/2020 at 10:17 AM, Mariona Sbert Soto said:

GDPR - Data Protection Regulation, what about this module?

Hi! We have installed this module on a spanish website. I don't know if you have to add something at "The Data Protection Act" (General Data Protection Regulation) of the website to inform the customer of this implementation? Because you are accessing to "personal data" about customer's purchases.

Thanks in advance!

 

Hi Mariona
Since it was years before the GDPR legislation that I developed this module, I did not checked it.
As I had a look, could not find any customer information part which can not be accessed via Back Office but shown in Front office by the module. So, I mean the visible data you mentioned such as previous orders (and also all the other address/private information) are already accessible at the back office as well. 
You may point out the password as an exception that allows backoffice user to login but can not be seen in back office. But module doesnt allow you to see it too. (it is not possible to read a customer password due to one-way encryption). 

In a nutshell: 
By the default Prestashop permissions that allow the back office user to access about the customer information is equal to the accessibility of this module function. 

Thanks for this qualitative question.  

 

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...
On 7/13/2020 at 6:15 AM, Edinson Perez Campos said:

alguien me puede ayudar, el modulo solo abre la sesión del primer cliente registrado.... en la V 1.7.6.7

 

Si, es lo mismo para mi en la version 1.7.5.1

 

For who doesn't speak spanish, the module always opens the first registered user. Has anyone else encountered the same problem?

Thanks

Share this post


Link to post
Share on other sites

Ok, I did some tests and i write a report here...

  1. The module in Github is working ONLY for PS versions starting from 1.7.5.1 and ending to 1.7.6.5.
  2. In PS 1.7.6.7 they changed something in the login feature, so it is broken, giving the login page (it doesn't open the first user either).
  3. The download of the first post is the same of the Github (eventually, the author updated it), to get the PS 1.6 version try the modified version in other posts, or try to remove the limitation on install module.

I notice this part in the Update log, they added 2 tables "ps_employee_session" and "ps_customer_session", perhaps this has something to do with the login failure?

[OK] SQL 1.7.6.6 SET SESSION sql_mode=''
[OK] SQL 1.7.6.6 SET NAMES 'utf8'
[DROP] SQL `ps_employee_session` table has been dropped.
[OK] SQL 1.7.6.6 CREATE TABLE `ps_employee_session` ( `id_employee_session` int(11) unsigned NOT NULL auto_increment, `id_employee` int(10) unsigned DEFAULT NULL, `token` varchar(40) DEFAULT NULL, PRIMARY KEY `id_employee_session` (`id_employee_session`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
[DROP] SQL `ps_customer_session` table has been dropped.
[OK] SQL 1.7.6.6 CREATE TABLE `ps_customer_session` ( `id_customer_session` int(11) unsigned NOT NULL auto_increment, `id_customer` int(10) unsigned DEFAULT NULL, `token` varchar(40) DEFAULT NULL, PRIMARY KEY `id_customer_session` (`id_customer_session`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
Database upgrade OK

In the change log it is mentionend they improved security in PS 1.7.6.6, using these tables: https://github.com/PrestaShop/PrestaShop/releases

Edited by zod
additional info (see edit history)

Share this post


Link to post
Share on other sites
On 7/18/2020 at 4:42 PM, zod said:
  1. The module in Github is working ONLY for PS versions starting from 1.7.5.1 and ending to 1.7.6.5.

I'm afraid it doesn't... I am running a 1.7.5.1 version and it doesn't work properly, opening the first registered used each time I try to log in with a customer (no matter which one).

Share this post


Link to post
Share on other sites
14 minutes ago, Ale_BB said:

I'm afraid it doesn't... I am running a 1.7.5.1 version and it doesn't work properly, opening the first registered used each time I try to log in with a customer (no matter which one).

I tested in PS 1.7.6.5 and it worked, perhaps it is something related to 1.7.5 subversion, but i have none to test actually.

Share this post


Link to post
Share on other sites

Hello Everyone !
I'm sorry that I can't get enough free time to update it for a long time. But I'll do in soon.

 

On 7/24/2020 at 4:47 PM, Daniel Patilea said:

....For those who need a solution for this, here's a working alternative...

Dear Daniel. Thanks for your help. I think while yours is a paid module that may not exactly be an alternative. If you updated it, (many thanks) I wish you share with the community. How is the idea to put a link of your paid version into your updated free version ? 
 

On 7/24/2020 at 4:54 PM, zod said:

I've found a working alternative already, it is from Datakick: https://store.getdatakick.com/en/modules/login-as-customer

Edit: Dear Zod . the owner of that website
Thanks for the updating and sharing it for free. Could you possible to add a link of this topic to your page too ? It may help users to find here.

 

 

Edited by MahmutGulerce (see edit history)

Share this post


Link to post
Share on other sites

Hello guys

On 7/25/2020 at 12:04 AM, MahmutGulerce said:

Dear Zod. Thanks for the updating and sharing it for free. Could you possible to add a link of this topic to your page too ? It may help users to find here.

I think there is a misunderstanding, I am not Datakick, I just found that module and I used it as alternative.

On 7/25/2020 at 12:16 AM, Rowan_86 said:

Fix:


$this->context->cookie->registerSession(new CustomerSession());

 

Tested it and working on PS 1.7.6.7. Good job!

Share this post


Link to post
Share on other sites
34 minutes ago, zod said:

I think there is a misunderstanding, I am not Datakick, I just found that module and I used it as alternative.

I'm sorry about that misconception . Thanks for correction.

Share this post


Link to post
Share on other sites

No, that one is yet another module, there are many. In this thread there is a little free version, updated by Rowan_86 to work with latest version of PS (1.7.6.6 +). And I posted another one free from Datakick.

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 1 month later...
On 7/27/2020 at 10:06 AM, Ale_BB said:

Too bad this doesn't work on PrestaShop 1.7.5.1 despite it's marked as compatible!

Too bad ps17 has habit to regularly break compatibility.

I'm too tired to update my modules after every release of ps17. I do that (not happily) for my paid modules, but I don't do that for my free modules anymore. I pity anyone who decided to use that platform to run their business on.

Share this post


Link to post
Share on other sites
17 hours ago, Dashe said:

I'll try this module on 1.7.6.7 and it's work fine until the last step of confirm order with a "Fatal Error"

 

I've just tested the module on clean installation of 1.7.6.7 and it works fine. I was able to log in as customer, and completed order without any issue. 

Share this post


Link to post
Share on other sites
16 minutes ago, Rowan_86 said:

Check your error logs, changing an address and selecting a shipping method works fine for me when I login as a customer.

my mistake sorry it works fine

 

Share this post


Link to post
Share on other sites
On 9/1/2020 at 2:28 PM, DataKick said:

Too bad ps17 has habit to regularly break compatibility.

I'm too tired to update my modules after every release of ps17. I do that (not happily) for my paid modules, but I don't do that for my free modules anymore. I pity anyone who decided to use that platform to run their business on.

Hey, don't take it personally, I was just commenting that it doesn't work even if my version is marked as compatible.

I appreciate that the module is free and I don't pretend that you give it regular and continuos support. Just saying.

Share this post


Link to post
Share on other sites
4 hours ago, Ale_BB said:

Hey, don't take it personally, I was just commenting that it doesn't work even if my version is marked as compatible.

I appreciate that the module is free and I don't pretend that you give it regular and continuos support. Just saying.

I have recently checked and my module works on vanilla ps 1.7.6.1 without any issues. A lot of other users confirmed this as well.

If it doesn't work on your site, then maybe the issue is on your side. You might have installed some module that prevents this one to work correctly. I know for a fact that some friendly-url modules can cause such issues. Also some caching modules can intervene / bypass the module hook entirely.

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 4 weeks later...
On 10/20/2020 at 11:40 PM, Bill Dalton said:

I have been using this module on PS 1.5.6.3 for years. Thank you very much for this very useful code!

I just tried it on PS 1.7.7.0 beta v.2 - works great.

Awesome, I will create a new release. All credits go to MahmutGulerce for this awesome plugin.

  • Like 1

Share this post


Link to post
Share on other sites
  • 2 months later...

there is a line of code that must be modified in the files. loginascustomer / controller / front / login.php

right now there is this code, so when the token is incorrect or modified it shows us a 500 error

$this->setTemplate('failed.tpl');

now it looks like this

image.thumb.png.54a07b1ca664917408f1b2ff2b21cc0f.png

solution 1:

the module has a template to show when the token is wrong, but it was not being used.

 

to use it we must change the code above for this below

$this->setTemplate('module:loginascustomer/views/templates/front/failed.tpl');

it will look like this using the template

image.thumb.png.22552ba441352b397414e1feb2962573.png

extra: 

the template is very ugly, but I'll give you some advice.
if you want your web header to appear you can do the following.


delete all the code of   loginascustomer / views / templates / front / failed.tpl
and add this other

{extends file='page.tpl'}

{block name="page_content"}
    <h2>{l s='Unauthorized' mod='loginas'}</h2>
    <p class="alert alert-danger">
        {l s='You are not authorized to use this feature' mod='loginas'}
    </p>
{/block}

now it will show like this

image.thumb.png.7c5a2287f75ad450f07c1535bd9193dd.png

Share this post


Link to post
Share on other sites

Hello,

This version worked perfectly for me with P.S 1.7.7

Download with this Download link

In back office inside customer account view at the end of the page you can see the option to login as that customer.

 

 

 

image_2021-01-17_212048.png

Share this post


Link to post
Share on other sites
On 1/11/2021 at 12:24 AM, alfonsolr09 said:

there is a line of code that must be modified in the files. loginascustomer / controller / front / login.php

right now there is this code, so when the token is incorrect or modified it shows us a 500 error


$this->setTemplate('failed.tpl');

now it looks like this

image.thumb.png.54a07b1ca664917408f1b2ff2b21cc0f.png

solution 1:

the module has a template to show when the token is wrong, but it was not being used.

 

to use it we must change the code above for this below


$this->setTemplate('module:loginascustomer/views/templates/front/failed.tpl');

it will look like this using the template

image.thumb.png.22552ba441352b397414e1feb2962573.png

extra: 

the template is very ugly, but I'll give you some advice.
if you want your web header to appear you can do the following.


delete all the code of   loginascustomer / views / templates / front / failed.tpl
and add this other


{extends file='page.tpl'}

{block name="page_content"}
    <h2>{l s='Unauthorized' mod='loginas'}</h2>
    <p class="alert alert-danger">
        {l s='You are not authorized to use this feature' mod='loginas'}
    </p>
{/block}

now it will show like this

image.thumb.png.7c5a2287f75ad450f07c1535bd9193dd.png

Thank you very much! @alfonsolr09 I approve your pull request as soon as possible
Thank you too @Ezequielb 

Share this post


Link to post
Share on other sites

Not directly related to this, but I am experiencing problems with newsletter registrations. I've sent out a newsletter, and under GDPR I have to unsubscribe some that are invalid (for example, a request from the widow of someone now dead, to avoid sending another newsletter). Unchecking the newsletter sub in the customer list does not change the subscription status in the account, which still shows subscribed. So I thought to try this log in as customer.

In 1.7.7.0 it works - I have the login button, and I can log in as the customer. I can uncheck the subscription to newsletter, but I cannot save this change because it demands a password (which I do not have of course). Is there a way round this? To make a change and save it, without needing a password?

Share this post


Link to post
Share on other sites

Yes, I understand. But in 1.7.7.0, at least, changing that tick for a cross does NOT change the registration. If I change from a tick to a cross, then check inside the customer account details, the customer is still registered for the newsletter. The registration still shows as green. There is no field inside the account that separately allows me to unsubscribe them.

Share this post


Link to post
Share on other sites

I'll do that ... Can anyone confirm that they can visit the customer list and change the status, and check that it has really changed the status in the customer record? That is, green to red / tick to cross in the list, but visiting the customer page it actually changes the status there?

Using the 'unsubscribe' link in a newsletter produces a correct deregistration. But trying manually on my system does not. If anyone else sees the same behaviour I'll raise a ticket, but otherwise I'll look for something wrong on my system.

Share this post


Link to post
Share on other sites

That looks good, thank you for posting. I can repeat these changes. But I think I am not clear enough. I can turn these on and off, no problem, showing the tick or cross. But when I refer to the customer details, this is a different screen. This one:

image.png.7bd0aadcf603fa28b1d730b42de71e5c.png

This is an entry where the customer listing shows a red cross - which can be changed to a tick - but nothing on my system alters the newsletter registration showing in the customer details. And if I generate a list of newsletter registrations (either for my use, or as used by Mailchimp etc), this customer still receives a newsletter. I cannot alter this registration manually from inside BO.

In your test, did you check inside the customer account details? This does not show in your video.

Again: change a green tick to red cross in the customer list, then check inside the customer information screen and see if it has really changed. Mine does not.

Thank you again for taking the trouble to check your system above - these things take time and I appreciate it.

image.png

Share this post


Link to post
Share on other sites
13 hours ago, Rowan_86 said:

My first best guess would be, check your max post variables if there is no error in the log files.

Sorry I meant max_input_vars, try setting it to 10000 as a test. Did you also have a look at your log files, is there anything?

Edited by Rowan_86 (see edit history)

Share this post


Link to post
Share on other sites

There's no errors showing in the log. The max_input_vars is set at 5000 by the service provider - there's a specific warning for this setting that anything higher will be ignored (there are maximum settings for all the php settings)

I still don't know if this is a bug and everyone suffers the same thing (changing the tick to cross, but not affecting the actual subscription in the information window), or it's my system throwing a fit somehow.

Edited by CJH
added extra info (see edit history)

Share this post


Link to post
Share on other sites
2 hours ago, CJH said:

Eso se ve bien, gracias por publicar. Puedo repetir estos cambios. Pero creo que no estoy lo suficientemente claro. Puedo encenderlos y apagarlos, no hay problema, mostrando la marca o la cruz. Pero cuando me refiero a los detalles del cliente, esta es una pantalla diferente. Éste:

image.png.7bd0aadcf603fa28b1d730b42de71e5c.png

Esta es una entrada en la que la lista de clientes muestra una cruz roja, que se puede cambiar a una marca de verificación, pero nada en mi sistema altera el registro del boletín que se muestra en los detalles del cliente. Y si genero una lista de registros de boletines informativos (ya sea para mi uso o como los usa Mailchimp, etc.), este cliente aún recibe un boletín informativo. No puedo modificar este registro manualmente desde dentro de BO.

En su prueba, ¿verificó dentro de los detalles de la cuenta del cliente? Esto no se muestra en tu video.

Nuevamente: cambie una marca verde a una cruz roja en la lista de clientes, luego verifique dentro de la pantalla de información del cliente y vea si realmente ha cambiado. El mío no.

Gracias nuevamente por tomarse la molestia de verificar su sistema arriba. Estas cosas toman tiempo y lo agradezco.

image.png

And did you check it on newsletter module??

Share this post


Link to post
Share on other sites
14 hours ago, CJH said:

No se muestran errores en el registro. El proveedor de servicios establece max_input_vars en 5000; hay una advertencia específica para esta configuración de que se ignorará cualquier valor superior (hay configuraciones máximas para todas las configuraciones de php)

Todavía no sé si esto es un error y todos sufren lo mismo (cambiar la marca para cruzar, pero sin afectar la suscripción real en la ventana de información), o es mi sistema el que falla de alguna manera.

It works good for me on 1.7.6.4. Tomorrow i will try it on 1.7.7.1.

20210125_030012.thumb.jpg.a223bfd18fdb860c1770925fca869073.jpg

Share this post


Link to post
Share on other sites

Yes, it worked for me in 1.7.6.9 and before that. Not for me in 1.7.7.0 (I have not yet updated to 1.7.7.1). If it works for others, then it's just me ... if not, I'll put a ticket on github

Share this post


Link to post
Share on other sites

Hello @MahmutGulerce ,

I have a Prestashop V 1.7.6.8

Do you also have this version?

I see on Github not this version, is another one compaible?

Hope to here you soon, and thank you for the great work! I was looking for this.

With kind regards,

Fons

Share this post


Link to post
Share on other sites
  • 2 months later...

Hi, where can i find a version that work with PS1.6 ? The download link on the first message refer already to PS 1.7.1.0 as minimum version.

Thank you in advance.

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More