PDA

View Full Version : Help Coding a Condition


aviscat
12-16-04, 03:25 PM
I am trying to add an order status of Shipped. I have done that successfully. Once the items are delivered I want to change the status to "Delivered" and NOT email the customer. I am trying to code it so that if the
'orders_status_id' is not 4 or 'orders_status_name' is not "Delivered" then an email will be sent. I don't want to send them a 4th email as they will know the item has been delivered. I have posted the code I am using but I am still getting a Delivered email. 'orders_status_id' is an integer and 'orders_status_name' is varchar. Can someone tell me what I am doing wrong?


if ($orders_status['orders_status_id'] !=4) {

$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HIS TORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

$customer_notified = '1';
}

--
Maria (aka aviscat)

stevel
12-16-04, 03:53 PM
You could, of course, just clear the checkbox that says to notify customer when you make the update. I'm away from my store sources right now so I can't comment on your code.

aviscat
12-16-04, 04:48 PM
You could, of course, just clear the checkbox that says to notify customer when you make the update. I'm away from my store sources right now so I can't comment on your code.

Another blonde moment. I will let my client know. You are the best.

stevel
12-16-04, 06:58 PM
Hey, I'm a blond(e) too! And yes, I have my moments...