I'd like to send mails to users with individual bonus or rebate-codes from a database-table. By this the users can benefit individually.
E.g.:
Hello User X on your next visit use the code 1234 to get 10% off (valid up until Decembre 24th)
Hello User Y on your next visit use the code 4711 to get 15% off. (valid up until Decembre 24th)
Best would be a db-table "available-rebates" with this (kind of) structure:
code_id (any number), created(date), valid_up_until(date), rebate_type, used (default:no), reserved_for_user(default:null)
So when a newsletter gets pushed out, the table gets queried and grabs any code from the table (where reserved_for_user=null) and sets the username to "reserved_for_user" (so that there are no double-entries).
I know that this is complex. ;)
A simple solution would be to say: "Click here to get 10% off", (for everybody) but this would not be very individual (and that's the point!).
Any comments on this will gracefully be appreciated.
Greetings
Cedrix
Comments
Comment #1
sutharsan commentedThis requires custom code. You could use hook_mail_alter() to modify outgoing emails.
Specialized functionality as you describe will not be included in simplenews.