twisted1919
Administrator
Staff memberThat looks good to me at first sight.Did you check attached file and my method and do you think it will work as i need ?
As you have said earlier, you have to extend the DSWH controller like you did with the campaign one and overwrite the methods with yours to add the right processing code to add in the customer blacklist.also could you help me to put subscriber in customer black list with feedback loop & i will again share code here for the community.
may be some one need changes like me...
However, i don't see why FBL's should be blacklisted in any way, this is not the right action. unsubscribe is and the app already does it.
You can create a main-custom.php file in your apps/console/config folder , with contents like:Most Important, how to extend this file in order to safe in update...
Code:
<?php defined('MW_PATH') || exit('No direct script access allowed');
return array(
'commandMap' => array(
'feedback-loop-handler' => array(
'class' => 'console.commands.MyFeedbackLoopHandlerCommand'
),
),
);
Yes, thats it.apps/console/commands/FeedbackLoopHandlerCommand.php
in this file on line 213 - 217 these line
$trackUnsubscribe = new CampaignTrackUnsubscribe();
$trackUnsubscribe->campaign_id = $campaign->campaign_id;
$trackUnsubscribe->subscriber_id = $subscriber->subscriber_id;
$trackUnsubscribe->note = 'Unsubscribed via FBL Report!';
$trackUnsubscribe->save(false);
is there place where feedback loops are processed and unsubscribed.
Something like what you used in your Campaigns controller will do it:and what code we can put here to add email in customer black list ?
Code:
$bl = new CustomerEmailBlacklist();
$bl->customer_id = $subscriber->list->customer_id;
$bl->email = $subscriber->email;
$bl->reason = 'Click on Report Abuse Link';
$bl->save();