Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

checkout_confirmation.php checkout_success.php


Guest

Recommended Posts

Posted

After clicking on confirm order on the checkout_confirmation.php page, it takes a good 2-3 minutes to load the checkout_success.php page. When I check the admin to see how long it takes for the order to be inserted into the pending orders it happens almost instantly after clicking the confirm order button but it still takes 2-3 minutes to finish loading the checkout_success.php page.

 

Has anyone else had this happen? It seems to have happened out of nowhere. I have around 500 products in the catalog and on another site I run there are almost 5000 products with no such delays. Again, this was working fine and just one day I began to receive complaints about the checkout time.

 

Any help is greatly appreciated.

Posted

check if the checkout_process.php is causing it to begin with. Instead of going from the confirmation to the payment page, change the url on your browser (once on confirmation) to checkout_process.php. (dont remove the session of course). See if there is delay there.

 

If there is still delay repeat the process but comment out the tep_mail calls in checkout_process.php to see if the mail server causes this.

Posted

Thanks for the tips. I will give these a shot right now and then I'll post my results.

Posted

I've narrowed it down to the Paypal IPN DB query. The code is as follows:

 

  $paypalipn_query = tep_db_query("select o.orders_status,p.* from " . TABLE_ORDERS . " o LEFT JOIN " . TABLE_PAYPALIPN_TXN . " p on p.item_number = o.orders_id AND o.customers_id = '" . (int)$customer_id . "' order by o.date_purchased desc limit 1");
 $paypalipn = tep_db_fetch_array($paypalipn_query);

 

When I comment these two lines out the checkout_success.php page loads instantly. When these lines are not commented out, the checkout_success.php page takes 2-3 minutes to load. I'm using credit card as the payment type yet this paypal db query is still made. I'm assuming that something in this query causes the delay for customers using credit cards. There must be something in this query that gets hung up when payment methods other than paypal are used on an order.

 

Is there any way to have this code run only if the order was paid for using paypal?

 

Thank you.

Posted

well they should not be specific payment module dependencies in the checkout_process.php. Have you asked the paypal ipn support thread for this? They might have more details how to change it. Looks like a bug to me.

Posted

No I haven't but I will do that as well.

 

One last questions though. I am using the PayPal IPN v0.981 for Milestone 2 contribution and have been for some time. Is this still the best one to use for accepting payments throguh paypal? I noticed it has not been updated in some time and since several variations are now available as contributions. Is any one of these more reliable than the others? I'm wondering if maybe the one I'm using is buggy and perhaps obsolete.

 

Thanks.

Posted

Without having 100% understanding of exactly what this line does, I have changed the paypalipn_query from

 

$paypalipn_query = tep_db_query("select o.orders_status,p.* from " . TABLE_ORDERS . " o LEFT JOIN " . TABLE_PAYPALIPN_TXN . " p on p.item_number = o.orders_id AND o.customers_id = '" . (int)$customer_id . "' order by o.date_purchased desc limit 1");

 

to

 

$paypalipn_query = tep_db_query("select o.orders_status,p.* from " . TABLE_ORDERS . " o LEFT JOIN " . TABLE_PAYPALIPN_TXN . " p on p.item_number = o.orders_id WHERE o.customers_id = '" . (int)$customer_id . "' order by o.date_purchased desc limit 1");

 

I simply changed the "o.orders_id AND o.customers_id" to "o.orders_id WHERE o.customers_id" and that seems to have taken care of my problem. I ran both queries from the mysql command line and ran top on another terminal and when I ran the original query mysqld sucked up my entire CPU for the 2-3 minute delay which was the same time roughly which customers were complaining about having to wait for the checkout_success.php page to display after clicking on the confirm order button. When I ran the second query, I got the results instantly with no delay whatsoever.

 

I'll have to wait and see if this causes me any problems with customers using PaypalIPN but if you don't hear back from me then I've found my solution.

 

Thank you very much for your help. Without it I would still be whacking my head against the wall on this one.

Posted

I have no idea how the tables are structured with IPN, I guess the merging/filtering of customer_id col somehow didnt work very well but why?

  • 3 weeks later...

Archived

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

×
×
  • Create New...