Record updated date/time

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 6 años
Hi guys,

Is the updated datetime recorded for entities such as customers, products, addresses etc..
The reason I'm asking is because I am implementing a 2 way synchronization between nop and my back-end system and I need the updated date to deal with conflicts when the information is updated on one of the two systems.

Thanks in advance
Hace 6 años
Most entities have a field called UpdatedOnUtc. :)

Hace 6 años
wooncherk wrote:
Most entities have a field called UpdatedOnUtc. :)



True, but not all entites. Customer for example hasn't got the UpdatedOnUtc column.
I think audit fields should be enforced on all the entities (lookup values excluded), I hope it's on the tasks list for the future.

Any suggestion how this could be solved without the UpdatedOnUtc column?
Hace 6 años
Maybe you can use the ActivityLog ...

SystemKeyword
-------------
AddNewCustomer
AddNewCustomerAttribute
AddNewCustomerAttributeValue
AddNewCustomerRole
DeleteCustomer
DeleteCustomerAttribute
DeleteCustomerAttributeValue
DeleteCustomerRole
EditCustomer
EditCustomerAttribute
EditCustomerAttributeValue
EditCustomerRole
Hace 6 años
New York wrote:
Maybe you can use the ActivityLog ...

SystemKeyword
-------------
AddNewCustomer
AddNewCustomerAttribute
AddNewCustomerAttributeValue
AddNewCustomerRole
DeleteCustomer
DeleteCustomerAttribute
DeleteCustomerAttributeValue
DeleteCustomerRole
EditCustomer
EditCustomerAttribute
EditCustomerAttributeValue
EditCustomerRole


Good suggestion, unfortunately logs like 'EditCustomerAddress' or 'EditMyAccount' are missing.
Looking at the source code it seems you have to call explicitly _customerActivityService.InsertActivity(..... to record the log, but changing the source code is not an option for me.

Any other idea?
Hace 6 años
RE: "changing the source code "

You could create a plugin that handles the Entity Updated events
Hace 6 años
New York wrote:
RE: "changing the source code "

You could create a plugin that handles the Entity Updated events


With a plugin I guess I would need some kind of notification after the core add/edit entity method is executed
so I can record the updated date in my plugin table.

Does Nop framework have something like this?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.