gaffettape:
Hi,
I'm trying to add the following bit of code from the customers.php to the orders.php file at around line #699 so that I can see on the order edit page whether an account was created when a customer placed that particular order:
<?php
// COWOA add new frameset here to display account status when looking at a customer detail record
?>
<tr>
<td class="formAreaTitle"><?php echo COWOA_SECTION_HEADING; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php if ($cInfo->COWOA_account) echo COWOA_STATUS_TRUE; else echo COWOA_STATUS_FALSE; ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
// END OF COWOA new frameset
?>
>
> As I mentioned above I have added this code to around line #699 of orders.php but for some reason the newly created Account Status box is just showing **Account Status Full Account Created** ..for ALL orders - even for orders that I know were placed without an account (i.e the customer COWOA).
>
> Any ideas why this isn't working?
>
> Thanks :smile:
The problem is that it doesn't touch that code in orders.php. Here is what you will need to get it to work as you want it to:
<?php
// COWOA add new frameset here to display account status when looking at a customer detail record
$check_status = $db->Execute("select customers_name, customers_email_address, orders_status,
date_purchased, COWOA_order from " . TABLE_ORDERS . "
where orders_id = '" . (int)$oID . "'");
?>
<tr>
<td class="formAreaTitle"><?php echo COWOA_SECTION_HEADING; ?></td>
</tr>
<tr>
<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php if ($check_status->fields['COWOA_order'] == 1) echo COWOA_STATUS_TRUE; else echo COWOA_STATUS_FALSE; ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
// END OF COWOA new frameset
?>