cancel
Showing results for 
Search instead for 
Did you mean: 

how to write updated_at timestamp in database?

how to write updated_at timestamp in database?

Hello!

 

We have this Problem: How we can write a updated_at timestamp for every change in the customer account?
Magento set a new updated_at timestamp only for username, name and lastname.
If you change the shipping adress, the updated_at is not touched:

  1. Login to the frontend in a customer account.
  2. Click on "Account information" and edit some information (firstname or lastname). Click on the save button.

Now go to the magento backend and click on customers -> manage customers. Now you see the grid with the correct "updated_at" timestamp.

  1. Login to the frontend in a customer account.
  2. Click on "Account information"
  3. Click on "Addressbook" and edit some information. Click on the save button. Now go to the magento backend and click on customers -> manage customers. Updated_at is not changed.

How can we set new updated_at timestamp for the address book also?

2 REPLIES

Re: how to write updated_at timestamp in database?

address is its own table and has its own updated_at field. if you want to see the timestamp of customer updated when address is updated, you can setup an observer for customer_save_after update the timestamp of customer there.

Re: how to write updated_at timestamp in database?

Thank you for your post!

Can you tell me how we can setup an observer for customer_save_after update for the timestamp?

In which file i have to add the code?

 

Thank you and best wishes from germany