Post by jae » Thu Mar 12, 2015 8:33 am

On a clean install, when I was working on the initial setup it seemed like the customers online report was working properly initially (it would fluctuate, I would see google crawler bots navigating the site etc.).

Now for some reason, it has stopped updating. It constantly shows 2 customers online and the last click was about a week ago, which shouldn't be the case. I've installed VQMOD and have a couple OCMODs, but I don't believe I've installed any extensions that would interfere with this. Could it be a permissions issue? How is it handled in the software?

I see nothing in error logs currently.

jae
Newbie

Posts

Joined
Fri Mar 06, 2015 2:34 am

Post by demirali » Fri Mar 13, 2015 12:49 am

system/store/default store/option/
account/online customers
--choose yes

Newbie

Posts

Joined
Fri Mar 13, 2015 12:46 am

Post by jae » Sat Mar 28, 2015 12:05 pm

demirali wrote:system/store/default store/option/
account/online customers
--choose yes
This was the first thing I checked. I tried turning it on and off multiple times and seeing if it would update, clearing my cookies, restarting everything etc. but it gives the same issues.

jae
Newbie

Posts

Joined
Fri Mar 06, 2015 2:34 am

Post by jae » Sat Apr 25, 2015 5:00 pm

Does anyone have any more insight on this? Still have not figured it out.

jae
Newbie

Posts

Joined
Fri Mar 06, 2015 2:34 am

Post by olfactorymaven » Fri Aug 05, 2016 11:28 pm

demirali wrote:system/store/default store/option/
account/online customers
--choose yes
I am presently having the same issue. Looking for file, however, when clicking on system there isn't a store folder. Any suggestions?

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by olfactorymaven » Fri Aug 05, 2016 11:36 pm

OK, not a file, but in the admin. Got it.

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by ADD Creative » Tue Aug 09, 2016 9:17 pm

From http://forum.opencart.com/viewtopic.php?f=161&t=166299
Greetings:

Over the past two weeks, I've noticed that the Customer Online Report is no longer showing online action. For example, I can receive several orders within an hour, but only know that from the orders coming in - when in the COR, I don't see any of those customers. Presently, the same IP Address shows (Texas). The other day, I was able to see a customer there, but with that IP Address. Not theirs, not their location. That one Customer (guest or actual customer) has that same IP Address. There's usually pages of online action, but now only one. So.... before posting this, I did search for a solution:

A. Tried admin>settings>store>options.... Not my issue
B. Looked into online.php..... Not my issue (I don't mind the 3600 seconds)
C. Looked for sql file in Installer. Could not figure that one out. Cannot find Installer in FTP

Is anyone else experiencing this? The above solutions were 2-4 years old, so thinking maybe there's new (more efficient solutions) now.

Any solutions?

Many thanks.
Have you inspected the 'customer_online' table in your database when you know there is a customer online? Do you have any messages in your error log?

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by olfactorymaven » Thu Aug 18, 2016 7:21 am

ADD Creative wrote:From http://forum.opencart.com/viewtopic.php?f=161&t=166299
Greetings:

Over the past two weeks, I've noticed that the Customer Online Report is no longer showing online action. For example, I can receive several orders within an hour, but only know that from the orders coming in - when in the COR, I don't see any of those customers. Presently, the same IP Address shows (Texas). The other day, I was able to see a customer there, but with that IP Address. Not theirs, not their location. That one Customer (guest or actual customer) has that same IP Address. There's usually pages of online action, but now only one. So.... before posting this, I did search for a solution:

A. Tried admin>settings>store>options.... Not my issue
B. Looked into online.php..... Not my issue (I don't mind the 3600 seconds)
C. Looked for sql file in Installer. Could not figure that one out. Cannot find Installer in FTP

Is anyone else experiencing this? The above solutions were 2-4 years old, so thinking maybe there's new (more efficient solutions) now.

Any solutions?

Many thanks.
Have you inspected the 'customer_online' table in your database when you know there is a customer online? Do you have any messages in your error log?
I did not get a notice about your reply. Thanks for doing so! No, I have not inspected the table. Is that a php under Admin>Controller>Report? I do not see anything in the error log pertaining to this issue. The error log in the Admin, yes?

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by ADD Creative » Fri Aug 19, 2016 12:58 am

The error logs are accessible from your OpenCart admin by going to System -> Error Logs. Look for any errors in files like footer.php, online.php, customer_online.php or any database errors.

To look at the database table you will need to login to your hosting control panel where there is usually a database administration tool such as phpMyAdmin. Using the tool find the database your OpenCart uses and look for the 'customer_online' table. You should be able to view the data in the table. What data is in the table should help you know if it's a problem recording the data or with the report generation.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by olfactorymaven » Sat Aug 20, 2016 2:46 am

ADD Creative wrote:The error logs are accessible from your OpenCart admin by going to System -> Error Logs. Look for any errors in files like footer.php, online.php, customer_online.php or any database errors.

To look at the database table you will need to login to your hosting control panel where there is usually a database administration tool such as phpMyAdmin. Using the tool find the database your OpenCart uses and look for the 'customer_online' table. You should be able to view the data in the table. What data is in the table should help you know if it's a problem recording the data or with the report generation.
Thank you. I'm looking at the table now. It reflects the same info as what's happening in the admin now. No additional info in the table - no history.

Additionally, the error logs do not show any errors pertaining to what you mentioned.

Talked to host- but it's a developer issue. And I have yet to find a solution through this OC forum to solve this issue.

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by olfactorymaven » Mon Aug 22, 2016 4:51 am

ADD Creative wrote:The error logs are accessible from your OpenCart admin by going to System -> Error Logs. Look for any errors in files like footer.php, online.php, customer_online.php or any database errors.

To look at the database table you will need to login to your hosting control panel where there is usually a database administration tool such as phpMyAdmin. Using the tool find the database your OpenCart uses and look for the 'customer_online' table. You should be able to view the data in the table. What data is in the table should help you know if it's a problem recording the data or with the report generation.
I just discovered that the same problem is happening on my other website. That site is OC 2.0.
I have no idea what is happening - what has happened. Frustrated a bit, but trying my best. :-\

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by JGAN » Mon Aug 22, 2016 3:10 pm

Did you add a CDN like Cloudflare by chance?

New member

Posts

Joined
Wed Jan 13, 2016 7:52 pm

Post by olfactorymaven » Mon Aug 22, 2016 9:23 pm

JGAN wrote:Did you add a CDN like Cloudflare by chance?
No. Nothing has been added.

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by ADD Creative » Tue Aug 23, 2016 12:01 am

If the table looks the same as the reports, that would point to a problem recording the data.

The relevant parts of the code are listed at the links below for version 1.5.6.4. If the version you are using is different you will need to check against the original files for that version.

https://github.com/opencart/opencart/bl ... hp#L48-L71

https://github.com/opencart/opencart/bl ... online.php

Check your files match the code above. If you are using vQmod you will need to check the vQmod cache version of the files.

Another thing you could try is checking the database table. Backup your database first. Then view the table in phpMyAdmin and go to operations. Then click on Check table to see if there are any problems reported. Then you can click Repair table. You could also try Empty the table (TRUNCATE). Just make sure you backup first and are working on the correct table.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by olfactorymaven » Tue Aug 23, 2016 2:03 am

ADD Creative wrote:If the table looks the same as the reports, that would point to a problem recording the data.

The relevant parts of the code are listed at the links below for version 1.5.6.4. If the version you are using is different you will need to check against the original files for that version.

https://github.com/opencart/opencart/bl ... hp#L48-L71

https://github.com/opencart/opencart/bl ... online.php

Check your files match the code above. If you are using vQmod you will need to check the vQmod cache version of the files.

Another thing you could try is checking the database table. Backup your database first. Then view the table in phpMyAdmin and go to operations. Then click on Check table to see if there are any problems reported. Then you can click Repair table. You could also try Empty the table (TRUNCATE). Just make sure you backup first and are working on the correct table.
Thank you. Per your helpful instructions, I compared the files. The all code in the first file mirrors each other. However, on the online.php there are differences. I also checked it according to my version 1.5.5.1 and it mirrors the link you provided but not my actual file. See screenshot. I just want to ask you if that makes a difference (lines under both $this...) before moving on to the database.

Edited For Update 3:55P: After reading through your reply and understanding TRUNCATE a bit more, I proceeded with backing up the database and TRUNCATE. The same issue is there. Same IP Address - no change.

Attachments

Screen Shot 2016-08-22 at 1.59.46 PM.png

Screen Shot 2016-08-22 at 1.59.46 PM.png (47.86 KiB) Viewed 1600 times


New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by olfactorymaven » Tue Aug 23, 2016 9:29 am

For the time being, I moved forward with an extension. Still will investigate this issue however.

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by ADD Creative » Tue Aug 23, 2016 9:15 pm

The lines under $this looks to just be where your text viewer is wrapping the long lines so you can see them.

Where you do see an IP in the report and database. Do you recognize the IP address? Is it one of your IP addresses or of your hosting or any kind of web service?

Also what time and date is List Click in the report and database?

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by olfactorymaven » Wed Aug 24, 2016 1:40 am

ADD Creative wrote:The lines under $this looks to just be where your text viewer is wrapping the long lines so you can see them.

Where you do see an IP in the report and database. Do you recognize the IP address? Is it one of your IP addresses or of your hosting or any kind of web service?

Also what time and date is List Click in the report and database?
It is not mine. Wait! It's my hostings'. I didn't see that before. So, what does that mean?

Time and Date on both is today's 8/23;10:36

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am


Post by ADD Creative » Fri Aug 26, 2016 3:45 am

It means that your host probably has some kind of proxy. OpenCart uses the PHP variable $_SERVER['REMOTE_ADDR'], but in your case this will be the IP of the proxy.

The client's original IP is usually passed in another header such as $_SERVER['HTTP_X_FORWARDED_FOR']. You'll need to check with your host if this is the case.

You could modify the code to look at the other variable for the client IP, although they are issues to be aware of when doing this as the other header variables can be spoofed.

If your third party extension is working for you, you are probably better sticking with that.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by olfactorymaven » Fri Aug 26, 2016 7:47 am

ADD Creative wrote:It means that your host probably has some kind of proxy. OpenCart uses the PHP variable $_SERVER['REMOTE_ADDR'], but in your case this will be the IP of the proxy.

The client's original IP is usually passed in another header such as $_SERVER['HTTP_X_FORWARDED_FOR']. You'll need to check with your host if this is the case.

You could modify the code to look at the other variable for the client IP, although they are issues to be aware of when doing this as the other header variables can be spoofed.

If your third party extension is working for you, you are probably better sticking with that.
Excellent! I appreciate the time you took to assist me. I will stick with the extension.

New member

Posts

Joined
Fri Apr 19, 2013 3:35 am

Who is online

Users browsing this forum: No registered users and 24 guests