Account Created date showing as todays date
Hi and thanks for any help you may have on this matter - I have searched the forums but have not seen mention of this....
In admin area / customers list my customers are all showing todays date as the date they were created.
If I leave it for one day and log back in any new customer have todays date as their account created and all other customer have the previous days date.
The moment I click on sort asc / des or click through to the next page every customer including the new customers now show todays date again as creation date.
In my database the correct dates are present so this is not a case of my database being overwritten - it appears that somehwere along the line the customers page is not pulling the correct data / or loses it after a page refresh ?
Any thoughts / help greatly appreciated.
Running 1.3.8
Super Orders mod installed
Using IE 7 and Firefox same results but back to back - ie if the error occurs when using IE7 and all customers update to account created todays date then when logging in in firefox all customers show todays date as account created date. ( so maybe there is something in the database causing this ?? )
I did import from an OSC database my customers /address book etc but there have been new accounts created since then with same problems.
Re: Account Created date showing as todays date
Is this a clean install of Zen Cart v1.3.8a or an Upgrade or possibly a customized Admin?
I cannot recreate this error ... :unsure:
Re: Account Created date showing as todays date
My admin has the same issue all accounts are shown as being created with today’s date? Just noticed it and this seems to be the only post about it, has a way to solve this been figured out yet?
Running the latest version, clean install 1.3.8a when you say custom what do you mean by that...mods? If so I have many installed and some custom ones. None of them are related to the customers however.
Re: Account Created date showing as todays date
If you have the time, could you setup a test database with the demo products and in a test directory for Zen Cart v1.3.8 and add some customers today and tomorrow, such as 3 or 4 for each day, and have 2 of them complete orders via Check/money order ...
Then see how the dates react?
I think there is something on your Live site doing this and if we find that nothing is wrong on the test site that it would be worth going through with something like Beyond Compare from scootersoftware and phpMyAdmin to look through the database and locate what has changed to make this happen ...
Re: Account Created date showing as todays date
Sorry for the delay in responding. I think I figured it out...Here is a little more information:
When viewing the customers from the Control Panel right when you login to the admin area the dates are fine. Even when you click on the link: Customers: Customers still fine it is when you click on the page link on the bottom of the screen (Customers: Customers)
Example << Page 1 of of 311 >>
Once you do that and view the customers that way all the dates change to todays date.
Hope this helps..
Re: Account Created date showing as todays date
One of our user had the same problem, so I could investigate and found why this happens and how to solve (but one thing still remains).
First of all go in your db and look at these 2 tables:
customers
customers_info
if they have different number of records, you'll surely have to face this problem (unless something very strange happened, if they're different surely customers will have more records than customers_info).
So why you find old account being registered with the date when you're going to 'search' for customers in admin?
This is quite simple:
in customers.php, around line 1200 there's this code:
$customers = $db->Execute($customers_query_raw);
while (!$customers->EOF) {
$sql = "select customers_info_date_account_created as date_account_created,
customers_info_date_account_last_modified as date_account_last_modified,
customers_info_date_of_last_logon as date_last_logon,
customers_info_number_of_logons as number_of_logons
from " . TABLE_CUSTOMERS_INFO . "
where customers_info_id = '" . $customers->fields['customers_id'] . "'";
$info = $db->Execute($sql);
// if no record found, create one to keep database in sync
if (!isset($info->fields) || !is_array($info->fields)) {
$insert_sql = "insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created)
values ('" . (int)$customers->fields['customers_id'] . "', '0', now())";
$db->Execute($insert_sql);
$info = $db->Execute($sql);
}
well, the first part executes the query to search (or display with filter) the customers, then there's a cycle, where for each customer found by the first query, it makes a query based upon the customer_id to retrieve info from customers_info table.
And here is the point: if no record is found for that customer_id, then it creates a new entry in this table, assigning now for the account_created_date field.
Here it is.
Now it would be interesting to understand why your customers_info table is missing some ids....
I've no clue for this, but if there's such a kind of code, maybe it means that it may happen....
Any hint from the dev team?
Re: Account Created date showing as todays date
Thanks, will look into this detail later today. To quickly answer you I have a good idea why my tables may be missing some ids. When I switch to Zen Cart I imported all my customers from the old shopping cart system I used. So the programmer I had do this must have left that out these ids when he did the import.
Thanks for your help!
Re: Account Created date showing as todays date
Can echo that here - switched from Oscommerce and fairly certain that field is not in the OSC setup.
Re: Account Created date showing as todays date
Ok I'm still having this issue, and the reason I believe my database is not in synced is because when I originally installed Zen cart it was a clean install however I hired a programmer to import my customer database, so I believe this field was not created.
Now my question is can I get them properly synced all at once?
Re: Account Created date showing as todays date
Not without going through your database tables to see what actually may have gone wrong on the import and see what is wrong with the data to throw these errors ...
So far, I still cannot reproduce the error but I will keep trying ...