I would agree that an admin should not manually add anyone to a list unless specifically requested. My changes only enable removing notifications.
In my case, I have a few products that are often out of stock. Customers often want to know when they are back in stock, so that's when I send the notifications. I occasionally have customers ask why they didn't receive the notification, and I had no way to know if they had requested it. I think my lists are timing out before all the emails are sent, but that's for another thread. I have not yet had a request to be removed from a list, but if I did, I could not have done so.
Sorry if this is bad form, but since the changes were limited to one file (customers.php), I'll post the changes here. Also, sorry for the hacked up formatting:
Code:
9/22/2014 9:13:52 AM
Mode: Differences with Context
-----------------------------------------------------
L262=R262
if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $customers_gender;
if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = ($customers_dob == '0001-01-01 00:00:00' ? '0001-01-01 00:00:00' : zen_date_raw($customers_dob));
zen_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "'");
-----------------------------------------------------
L268 //TODO: HLT - figure out which pn's to delete
for($i=0; $i<=1000; $i++)
{
if(!isset($_POST['notify-' . $i]))
{
$db->Execute("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . "
where customers_id = '" . (int)$customers_id . "' and products_id = '" . $i . "'");
}
}
-----------------------------------------------------
L278=R268 $db->Execute("update " . TABLE_CUSTOMERS_INFO . "
set customers_info_date_account_last_modified = now()
where customers_info_id = '" . (int)$customers_id . "'");
if ($entry_zone_id > 0) $entry_state = '';
$sql_data_array = array('entry_firstname' => $customers_firstname,
-----------------------------------------------------
L875=R865 echo zen_draw_hidden_field('customers_newsletter');
} else {
echo zen_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0'));
}
?></td>
</tr>
-----------------------------------------------------
L881
<tr>
<td class="main"><?php echo "Product Notifications"; ?></td>
<?php
$products = $db->Execute("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . $customers_id . "' and pn.products_id = pd.products_id order by pd.products_name");
?>
<?php
while (!$products->EOF) {
?>
<td class="main">
<?php echo zen_draw_checkbox_field('notify-' . $products->fields['products_id'], '1', true, 'id="notify-' . $products->fields['products_id'] . '"'); ?>
<label class="checkboxLabel" for="<?php echo 'notify-' . $products->fields['products_id']; ?>"><?php echo $products->fields['products_name']; ?></label>
<?php
$products->MoveNext();
?>
</td>
</tr>
<tr>
<td class="main"></td>
<?php
}
?>
</tr>
-----------------------------------------------------
L914=R871 <tr>
<td class="main"><?php echo ENTRY_PRICING_GROUP; ?></td>
<td class="main">
<?php
if ($processed == true) {
if ($cInfo->customers_group_pricing) {
$group_query = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . " where group_id = '" . (int)$cInfo->customers_group_pricing . "'");
Bookmarks