Thats not a bad way to do it, looks good.
Depending on how frequently products are updated I would find the update email somewhat annoying if it was occurring multiple times a day. I would add a new boolean field to the object, mark it as updated, then send out an email daily or even weekly depending on the requirements.
Using Scheduled tasks, even though it's 2.4 docs it will be the same for 3.x
http://api.silverstripe.org/2.4/class-ScheduledTask.html
class ProductUpdateTask extends DailyTask {
function process() {
// email product summary here
}
}
Posted to: Email notifications on new and updated data objects | Show Thread | Post Reply