Page 1 of 2

Customer cant login

Posted: Thu Mar 01, 2018 1:49 pm
by boiler
Hello,

I just trying to use oc3 but there is a problem when trying to login to the customer area even the data is there on the database
Is there anyone here getting same problem too ?

Re: Customer cant login

Posted: Thu Mar 01, 2018 6:05 pm
by straightlight
Imprecise OC version posted. Opencart.com uses 4 decimals.

Re: Customer cant login

Posted: Mon Mar 05, 2018 12:10 am
by boiler
sorry i'm forgot to mention the opencart detail version
I'm using opencart 3.0.2.0

Re: Customer cant login

Posted: Mon Mar 05, 2018 6:16 am
by straightlight
Uninstall all installed extensions
Try to login with a fresh OC copy

and see if the issue persists afterwards.

Re: Customer cant login

Posted: Mon Mar 05, 2018 10:15 pm
by boiler
how to uninstall all installed modules ?
I know how to do it in version 1.5 but i dont know in version 3.0.2.0, it was a big chance and make me confused

Re: Customer cant login

Posted: Mon Mar 05, 2018 10:39 pm
by straightlight
There is nothing about being confused when installing / uninstalling a module. It is rather about accepting the terms and responsibilities as being part of maintaining a store online. Admin - > extensions - > extensions . Admin - > extensions - > modifications.

Re: Customer cant login

Posted: Wed Apr 04, 2018 10:23 am
by boiler
had trying everything to make customer login working but it's seem no clue about the error

Re: Customer cant login

Posted: Wed Apr 04, 2018 6:45 pm
by straightlight
What do the error logs report when attempting to login?

Re: Customer cant login

Posted: Thu Apr 05, 2018 11:15 am
by boiler
there is no error log and that's weird
can you please help me looking at the site http://marketplace.doki.co.id

thank you in advance for your help :)

Re: Customer cant login

Posted: Thu Apr 05, 2018 8:20 pm
by straightlight
Your site seem to be taking way too much time to load. I would first suggest to use a web site analyzer and view their analysis reports. As for the customer login, see if you have the error_log file in your FTP's root store path.

Re: Customer cant login

Posted: Thu Apr 05, 2018 11:24 pm
by boiler
ah sorry, it's seem the International Connection from the data center is limited
anyway i had try to compare with standard theme and standard installation and the problem is still happened
as you can see on the attachment i had attach, after doing login post method, it was redirect back to login page again

i think there is something wrong with the code on route=/account/account

Re: Customer cant login

Posted: Thu Apr 05, 2018 11:34 pm
by straightlight
If so, test OC v3.0.2.0 on a test folder of your live server and see if the same issue can be reproduced with a new database.

Re: Customer cant login

Posted: Fri Apr 06, 2018 12:00 am
by boiler
I guess the problem is with the session but the main live site is running well using OC 1
marketplace.doki.co.id is using the same server configuration with the live site

Re: Customer cant login

Posted: Fri Apr 06, 2018 12:14 am
by straightlight
For session handling, see this solution: viewtopic.php?f=198&t=202726&p=716825#p716825

Re: Customer cant login

Posted: Fri Apr 06, 2018 1:31 am
by boiler
still same
the page is going redirected again to route=/account/login after reaching route=/account/account

based on the code at account.php it's seem the code can't validate if the user already login or not

this one below is from 3.0.2.0 OC

Code: Select all

if (!$this->customer->isLogged()) {
			$this->session->data['redirect'] = $this->url->link('account/account', '', true);

			$this->response->redirect($this->url->link('account/login', '', true));
		}
this one below is from 1.5.6.4 OC

Code: Select all

if (!$this->customer->isLogged()) {
			$this->session->data['redirect'] = $this->url->link('account/account', '', 'SSL');

			$this->redirect($this->url->link('account/login', '', 'SSL'));
		}
the one from 1.5.6.4 OC is working fine but from 3.0.2.0 OC not working at all and there is no error log being logged

Re: Customer cant login

Posted: Fri Apr 06, 2018 4:07 am
by straightlight
I did saw another post about a solution for this issue but can't seem to find it.

In your catalog/controller/account/account.php file,

find:

Code: Select all

$this->response->redirect($this->url->link('account/login', '', true));
replace with:

Code: Select all

$this->response->redirect($this->url->link('account/account', '', true));

Re: Customer cant login

Posted: Fri Apr 06, 2018 1:04 pm
by boiler
your code above will means the condition for checking user login or not will be ignored, am i right ?
the code

Code: Select all

$this->response->redirect($this->url->link('account/login', '', true));
is inside the condition where user is not login will be redirect to the login page when he/she trying accessing the account page directly

the main problem is i think because the condition cannot work properly
may i know which function is handle $this->customer->IsLogged ?

Re: Customer cant login

Posted: Fri Apr 06, 2018 1:12 pm
by boiler
after trying to debug the session that responsible to the login function which is $this->session->data['customer_id'] that being used by isLogin function, I got the error below ...

Code: Select all

Notice: Undefined index: customer_id in /home/marketplace/public_html/original/catalog/controller/account/account.php on line 4

Re: Customer cant login

Posted: Sat Apr 07, 2018 12:33 am
by straightlight
What is on line 4 of that file? More information is needed.

Re: Customer cant login

Posted: Sat Apr 07, 2018 12:50 am
by boiler
I got the problem bro
It's seem on function isLogged does not parsing customer_id and it's seem the customer_id is empty
the file is on system/library/cart/customer.php

when I'm trying to change it to character its worked so the problem must be on the login function that not parsing the customer_id