OpenCart doesn't use a "session" table (hasn't for quite some time). Instead, sessions are stored as cookies.Brook wrote:I understand that user_type is a field in the opencart_session table. (customer, guest, bot)
For example:
Code: Select all
$this->session->data['customer_id']
The whos_online table counts these unique session id's. It is also "self-cleaning". Every time a page is loaded, a function checks the timestamps on the entries in the whos_online table, and anything that is older than the time set in the admin is deleted (minimum is 5 minutes).
It is my intention to include a means of differentiating bots from guests. When I've got it sorted, anybody who has purchased this module will be entitled to a free update.
The only way (at the moment) to reset the counter is via phpMyAdmin (or something similar) and delete the entries in the counter and counter_history tables. This is also something I will look at for an update.
Both osCommerce and ZenCart use a 2 table setup for their counters (counter and counter_history). The table structure that I have used for the "Earthball" counter table is very similar to that used in osCommerce and ZenCart. I think the only differences are the date format and the start date field name. Both osCommerce and ZenCart have a "startdate" field that holds the date as "Ymd", while the "Earthball" module uses "start_date" as the field name and the date is formatted as "Y-m-d" (the same as elsewhere in OpenCart).i2Paq wrote:I want to copy the total of visitors in my current osCommerce counter to your counter so I won't lose this total.
You say I have to divide them over 2 tables?
The counter_history is structured a bit differently to that in osCommerce and ZenCart. The "Earthball" module keeps a daily record, while both osCommerce and ZenCart keep a monthly record.
It might be possible to convert the counter tables from osCommerce or ZenCart to those for the "Earthball". If you could send me a "dump" of your counter and counter_history tables from your osC setup, I might be able to convert them for you.