DennieN Posted May 10, 2010 Share Posted May 10, 2010 Hi First off lets say this is a great contribution does exactly what is say it should. I have done several modifications to the coding to achieve what I needed and it all works great with one exception. I seemed to have knocked out the code somewhere on the quote hadler inside the admin section. What I am getting is all notification e-mails are going to the same e-mail address. I can see the post change on the quote id but it does not seem to effect the send e-mail address. the code looks straight forward enough but does not work for me. the code looks like this else if (isset($_POST['send_email']) && substr($_POST['send_email'], "quote_") !== FALSE) { $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_email_address LIKE '" . $_POST['email_address'] . "'"); $customer = tep_db_fetch_array($customer_query); $to = $customer['customers_firstname'] . ' ' . $customer['customers_lastname']; $to_email_address = $_POST['email_address']; $subject = TEXT_QUOTE_READY; $body = sprintf(TEXT_GREETING, $to) . "\n\n" . sprintf(TEXT_QUOTE_MESSAGE, HTTP_SERVER . DIR_WS_CATALOG . '/quotes.php') ."\n"; $from = STORE_OWNER; $from_email_address = STORE_OWNER_EMAIL_ADDRESS; tep_mail($to, $to_email_address, $subject, $body, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $quoteID = substr($_POST['send_email'], strlen("quote_")); tep_db_query("update " . TABLE_QUOTES . " set quote_notified = 1 where quote_id = " . $quoteID); } } The output of $_POST is action=process ttl_quotes=4 notified=on quote_id=44 email_address=d.niccol@xxxxxxxxxxx.co.uk send_email=quote_39 The send e-mail changed each time you select a different quote but the quote id and the e-mail address remain the same. any ideas would be welcome Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.