rordallas 4 Posted August 4, 2020 Report Share Posted August 4, 2020 X2CRM version 8.0 Scenario 1:A contact unsubscribes from a specific campaign category email, such as Marketing. The contact email address is then listed in the appropriate x2_list_items table as unsubscribed. Create a new campaign with the Marketing category specified. Include the Contact that has unsubscribed in the contact list for the campaign. Launch the campaign from the interface by clicking the 'Launch' button. The result of this is the contact is not emailed because they have already unsubscribed. THIS IS THE EXPECTED RESULT Scenario 2:Same as above except schedule the campaign for some time in the future. When the campaign fires, the result is the contact is emailed. UNEXPECTED RESULT Quote Link to post Share on other sites
jack 29 Posted August 6, 2020 Report Share Posted August 6, 2020 Thank you for the bug report rordallas,I have writen a fix that will now be in the next update. If you need it now add this function to "protected/modules/marketing/models/Campaign.php //check to make sure unsubscribe list exsist, if not make the list public static function checkUnsubList($Category) { $FullName = 'Unsubscribe_' . $Category . '_X2_internal_list'; $list = CActiveRecord::model('X2List') ->findByAttributes(array('name' => $FullName)); if (empty($list)){ $NewUNSub = new X2List; $NewUNSub->modelName = 'Contacts'; $NewUNSub->type = 'UnSubscribe'; $NewUNSub->assignedTo = 'Anyone'; $NewUNSub->visibility = 1; $NewUNSub->name = $FullName; $NewUNSub->nameId = $FullName; $NewUNSub->createDate = time(); $NewUNSub->lastUpdated = time(); $NewUNSub->logicType = 'AND'; $NewUNSub->save(); } return($list); } and add to the file protected/modules/marketing/components/CampaignMailingBehavior.php //check catagory Campaign::checkUnsubList($campaign->category); $FullName = 'Unsubscribe_' . $campaign->category . '_X2_internal_list'; $catlist = CActiveRecord::model('X2List')->findByAttributes(array('name' => $FullName)); $campaign->categoryListId = $catlist->id; $campaign->save(); under the line if($newList->save()) {in the function public static function sendMail($id = null, $t0 = null) Quote Link to post Share on other sites
rordallas 4 Posted August 18, 2020 Author Report Share Posted August 18, 2020 Thanks for your prompt response to this matter! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.