Zen Cart Logo
Forums / General Questions / customer order email from ipn_main_handler or checkout_process

customer order email from ipn_main_handler or checkout_process

Views: 512

Results 1 to 7 of 7
7 Oct 2012, 3:47 PM
#1
saderogba avatar

saderogba

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

customer order email from ipn_main_handler or checkout_process

Please is the customer order email sent from ipn_main_handler or checkout_process?

I notice both files has a line that calls $order->send_order_email.

7 Oct 2012, 5:05 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: customer order email from ipn_main_handler or checkout_process

Neither.

What is the business problem you're trying to solve?

7 Oct 2012, 6:30 PM
#3
saderogba avatar

saderogba

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

Re: customer order email from ipn_main_handler or checkout_process

I added this code to the checkout_process.php in includes/modules. When I tested with money order payment, I get expected result but when I tested with paypal standard payment, I didn't get the expected result; it looks like the entire block of code I added was skipped so I am trying to figure out what the problem is.

$order->send_order_email($insert_id, 2);
//added block start
if(strpos($order->info['payment_method'],"Postal") === false)
{
 include(DIR_WS_MODULES."smiffysSubmitOrder.php");
 smiffys();
 file_put_contents(DIR_FS_CATALOG."tmp/order_".date("YmdHis").".txt", print_r($order,true));
}
//added block end
7 Oct 2012, 7:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: customer order email from ipn_main_handler or checkout_process

Right.

Use PayPal Express Checkout instead, and you won't have that problem.

You should only use Standard as a** last-resort** such as if your hosting company can't handle CURL requests which are required by the more modern and more reliable modules like Express Checkout.

7 Oct 2012, 7:46 PM
#5
saderogba avatar

saderogba

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

Re: customer order email from ipn_main_handler or checkout_process

Thank for your reply. I am checking with my client to see using express checkout is possible. Please what in paypal standard is causing the problem and is the problem with ipn_main_handler.php or checkout_process.php?

8 Oct 2012, 2:42 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: customer order email from ipn_main_handler or checkout_process

The problem is that the "Standard" module completes checkout in a completely disconnected way, which doesn't follow the normal built-in order processing steps.

It's not smart to waste time writing custom code to hijack the code for Standard, when it all works fine when using Express Checkout.