Hi Everyone,
Here is my issue I am experiencing.
I just put up a new site, http://www.imajercleaners.com.
Once a customer logs in, in the tpl_header.php, I've added the following:
<?php
if(isset($_SESSION['customer_id'])){
$check = $db->execute('select sum(amount) as amount from ' . TABLE_STORE_CREDIT . ' where customers_id='. (int)$_SESSION['customer_id']);
$amount = $check->fields['amount']; ?>
<td align="left" class="bold">Balance:<?php echo $currencies->format($amount);?></td>
<?php
}else{
$amount = 0;
}
?>
This is so that the customer can see their account balance at the top of the page.
The problem is after the 1st purchase, the amount of the purchase displays in the store credit, I need to manually set the credit to 0 otherwise the amount of the 1st purchase is displayed in the header.
After setting to 0, the purchases do not affect the credit.
Please let me know if I am being unclear about my explanation.
Thank you,
Arthur



