Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My store has stopped emailing keycodes (virtual product)


ancientmember

Recommended Posts

I have a store that emails unigue keycodes instantly after payment is received. However, it had been truncating keycodes that started with 0 (zeroes) and i had it changed its value from "integer" to "text" by the original programmer, but somehow it stopped emailing them. Then i asked the guy to change it back to how it was originally, but it still doesn't email. The programmer guy has disappeared since and i'm stuck with nonfunctioning module. Can anyone point me to where he messed up? I wanted to post the coding but don't know which file's.

I'm willing to pay if i'm asking too much here. Thanks!

Link to comment
Share on other sites

the file that sends the email right after an order, is catalog\checkout_process.php This is where you should begin looking for the code that sets up the mail content.

Link to comment
Share on other sites

Thank you for your reply! Here is what i have as email confirmation in that file. Do you see anything suspicious?

 

 

// lets start with the email confirmation

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered . "\n" .

"Phone Card Keycodes\n" .

EMAIL_SEPARATOR . "\n" .

$email_keycodes . "\n" .

EMAIL_SEPARATOR . "\n";

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";

}

 

$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order."\nHi, my name is Bill", STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

// load the after_process function from the payment modules

$payment_modules->after_process();

 

$cart->reset(true);

Link to comment
Share on other sites

yes here's your keycode variable

 

$email_keycodes from this line:

 

$email_keycodes . "\n" .

 

but where it is initialized? probably further up in that file?

Link to comment
Share on other sites

This is all left after the previous codes in that file. I can post before that too.

 

/ unregister session variables used during checkout

tep_session_unregister('sendto');

tep_session_unregister('billto');

tep_session_unregister('shipping');

tep_session_unregister('payment');

tep_session_unregister('comments');

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...