Customer Info Change

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
vashts1980
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Fri Apr 29, 2011 2:56 pm

Customer Info Change

Post by vashts1980 » Fri Jun 10, 2011 7:40 am

I'm working on an integration project, and I was wondering if there was a way to track if a user's information changed. Most notably if the addresses changed. I saw the IsDirty property, but I wasn't sure if it correctly applied. My integration code is to be executed at the end of the CheckedOut method in the OnePageCheckout.acsx.cs file.

--Mike

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Customer Info Change

Post by AbleMods » Mon Jun 13, 2011 7:08 am

The user object class does not have any fields for date-added or date-modified. Nor does the addresses table. Your only option would be to create an SQL trigger on ac_Users and ac_Addresses so you can maintain the add/edit status of a each record in a separate table. Or if you have full source, just modify the base object classes and add your own date-added/date-modified fields.

The IsDirty() flag is only used internally by the database engine and only for a specific instance of the object itself. Once a specific instance of an object is saved back to disk, IsDirty() flag for that object instance is reset to false. I wouldn't recommend relying on it to determine if changes were made to address or user objects as a whole.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply