== INCOMPLETE/DESIGN IN PROCESS ==
Problem/Motivation
When a donor donates, we want the ability to add them to an external newsletter service.
Proposed resolution
Create an post-donation event that sends the email to an event subscriber.
• Define an event such as:
final class DonationEvent
{
/**
* Name of the event fired after a donation.
*
* @Event
*
* @var string
*/
const POST_DONATION = 'campaign_kit:post_donation';
private addToNewsletter: "Standard"
private newsletterLists: (add array value of "Main")
private isSuccessful: (use TRUE or FALSE depending on whether the donation went through)
private resultCode:
private donerEmail:
private donationAmount:
private donationType:
private donerFirstName:
private donerLastName:
}
-- Process --
- When the general config Ask to add to newsletter checkbox is enabled, set the campaign Ask to add to newsletter to "Standard". Otherwise, set it to "None".
- When creating the campaign, copy the "Default Newsletter ID" into the campaign Newsletter ID.
- In the custom SFIC custom event subscriber, place a switch statement that is based on the campaign Newsletter ID. Leave the case "MailChimp" empty for now.
Remaining tasks
User interface changes
-- General Configuration --
- Add a textfield (16 chars) on the general CK configuration page: "Ask to add to newsletter?"
- Add a textfield (64 chars) on the general CK configuration page: "Default Newsletter ID."
-- Campaign Form (for campaign administrators) --
- Add a textfield (16 chars) to the campaigns that only an administrator can see: "Ask to add to newsletter?"
- Add a textfield (64 chars) on the the campaigns for "Newsletter ID".
Data model changes
-- General Configuration --
- Add a textfield (16 chars) on the general CK configuration page: "Ask to add to newsletter?"
- Add a textfield (64 chars) on the general CK configuration page: "Default Newsletter ID."
-- Campaign Form (for campaign administrators) --
- Add a textfield (16 chars) to the campaigns that only an administrator can see: "Ask to add to newsletter?"
- Add a textfield (64 chars) on the the campaigns for "Newsletter ID".
Comments
Comment #2
aangel commentedComment #3
aangel commentedComment #4
aangel commented