Elliot Cater
Member
Hi
I'm wanting to add in the functionality to have anyone who unsubscribes from one of a customer's lists, also be added to that customer's blacklist.
I thought about having a checkbox in the "Actions when unsubscribe" tab of "customer/lists" for this.
I'm picking through:
apps/customer/views/lists/form.php
apps/customer/controllers/ListsController.php
apps/common/models/Lists.php
apps/frontend/controllers/ListsController.php
I've added this code in the "tab-subscriber-action-when-unsubscribe" tab in form.php
I've added the "blacklist_unsubscribers" to the rules function in Lists.php model and I've added the new "blacklist_unsubscribers" field to the mw_lists table (as enum yes/no). The form now shows the error "Property "Lists.blacklist_unsubscribers" is not defined."
I've been looking at the "welcome_email" property (as that is a similar field and in the same table) but I can't for the life of me see where it is defined...
Any help would be greatly appreciated.
Cheers
Elliot
I'm wanting to add in the functionality to have anyone who unsubscribes from one of a customer's lists, also be added to that customer's blacklist.
I thought about having a checkbox in the "Actions when unsubscribe" tab of "customer/lists" for this.
I'm picking through:
apps/customer/views/lists/form.php
apps/customer/controllers/ListsController.php
apps/common/models/Lists.php
apps/frontend/controllers/ListsController.php
I've added this code in the "tab-subscriber-action-when-unsubscribe" tab in form.php
PHP:
<div class="callout callout-info" style="margin-bottom: 5px; margin-top: 5px;">
<?php echo Yii::t('lists', 'When a subscriber will unsubscribe from this list, add them to the customer blacklist');?>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<?php echo $form->labelEx($list, 'blacklist_unsubscribers');?>
<?php echo $form->dropDownList($list, 'blacklist_unsubscribers', $list->getYesNoOptions(),$list->getHtmlOptions('blacklist_unsubscribers')); ?>
<?php echo $form->error($list, 'blacklist_unsubscribers');?>
</div>
</div>
</div>
I've added the "blacklist_unsubscribers" to the rules function in Lists.php model and I've added the new "blacklist_unsubscribers" field to the mw_lists table (as enum yes/no). The form now shows the error "Property "Lists.blacklist_unsubscribers" is not defined."
I've been looking at the "welcome_email" property (as that is a similar field and in the same table) but I can't for the life of me see where it is defined...
Any help would be greatly appreciated.
Cheers
Elliot
Last edited: