I need to get the ADMIN>CUSTOMERS>REWARD POINTS table to display email address field. I am trying to modify admin/customers_reward_points.php. I added:
Code:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="75%" height="1px"></td>
<td width="25%" height="1px"></td>
</tr>
<tr>
<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_ID; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_LAST_NAME; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_FIRST_NAME; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_EMAIL_ADDRESS; ?</td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_PENDING_POINTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_EARNED_POINTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMER_PRICING_GROUP; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_GROUP_REDEEM_RATIO; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?></td>
</tr>
<?php
if(isset($_SESSION['search']))
$where=" WHERE (c.customers_lastname LIKE '%".$_SESSION['search']."%' OR c.customers_firstname LIKE '%".$_SESSION['search']."%' OR c.customers_id LIKE '%".$_SESSION['search']."%' OR c.customers_email_address LIKE '%".$_SESSION['search']."%')";
else
if(isset($_SESSION['customer_sort_index']))
if($_SESSION['customer_sort_order']==1)
$where=" WHERE c.customers_firstname LIKE '".$_SESSION['customer_sort_index']."%'";
else
$where=" WHERE c.customers_lastname LIKE '".$_SESSION['customer_sort_index']."%'";
else
$where="";
switch($_SESSION['customer_sort_order'])
{
case (0):
$order_by=" ORDER BY c.customers_lastname";
break;
case (1):
$order_by=" ORDER BY c.customers_firstname, c.customers_lastname";
break;
case (2):
$order_by=" ORDER BY c.customers_id, c.customers_lastname";
break;
case (3):
$order_by=" ORDER BY gp.group_name, c.customers_lastname";
break;
case (4):
$order_by=" ORDER BY r.pending_points DESC, c.customers_lastname";
break;
case (5):
$order_by=" ORDER BY r.reward_points DESC, c.customers_lastname";
break;
case (6):
$order_by=" ORDER BY o.date_purchased DESC, c.customers_lastname";
break;
}
$group_by="";
$limit=" LIMIT ".REWARD_POINTS_CUSTOMER_LIMIT;
$customer_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, r.pending_points, r.reward_points, gp.group_name, rm.redeem_ratio from ".TABLE_CUSTOMERS." as c LEFT JOIN (".TABLE_REWARD_CUSTOMER_POINTS." as r) ON (r.customers_id=c.customers_id) LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(".TABLE_REWARD_MASTER." as rm) ON ((c.customers_group_pricing!=0 AND rm.scope=".SCOPE_GROUP." AND rm.scope_id=c.customers_group_pricing) OR (c.customers_group_pricing=0 AND rm.scope=".SCOPE_GLOBAL." AND rm.scope_id=0))".$index.$where.$group_by.$order_by.$limit.";";
//echo $customer_query_raw;
$customers = $db->Execute($customer_query_raw);
while (!$customers->EOF)
{
//$redeem_points=GetRewardPointRecord(SCOPE_GROUP,$customers->fields['customers_group_pricing']);
if(isset($_GET['id']) && $customers->fields['customers_id']==$_GET['id'])
{
echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\''.zen_href_link(FILENAME_ADMIN_CUSTOMER_REWARD_POINTS,'id='.$customers->fields['customers_id'].'&action=edit').'\'">'."\n";
$current_customer=$customers->fields;
}
else
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_ADMIN_CUSTOMER_REWARD_POINTS,'id='.$customers->fields['customers_id'].'&action=edit').'\'">'."\n";
?>
<td class="dataTableContent"><?php echo $customers->fields['customers_id']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_firstname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_email_address']; ?></td>
<td class="dataTableContent"><?php echo (int)$customers->fields['pending_points']; ?></td>
<td class="dataTableContent"><?php echo (int)$customers->fields['reward_points']; ?></td>
<td class="dataTableContent"><?php echo CheckText($customers-
When I did this I broke the page with error on line 239. Could someone please help me with this. PHP is not my strength.
Thank you!
Bookmarks