Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

checkout process not redirecting to checkout success


siouxsie

Recommended Posts

I am having a hard time isolating this issue.

 

I want the success page after someone purchases but in all the tests it only redirects you to the empty cart!

 

I am was thinking it is this code in checkout_process.php

 

 

// if there is nothing in the customers cart, redirect them to the shopping cart page

if ($cart->count_contents() < 1) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

 

but when I comment it out it is still doing it!

 

Can anyone clue me in?

 

I have OSC 2.3.3 installed with modules consolidated login with guest login and ccgv (discount and credit system).

 

THanks

Link to comment
Share on other sites

Hi

Assuming that you are not using a payment module that 'hijacks' the checkout process file... (if you are try testing using a different one)

 

If the order emails are getting sent out then the code after that in checkout process is:

 

// load the after_process function from the payment modules
 $payment_modules->after_process();
 $cart->reset(true);

// 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');

 

If the cart is being emptied then I'd have thought that $payment_modules->after_process(); could be ignored - however there's not a lot after that in the code that could cause the redirect so it may be worth looking at the function after_process() in your payment module just in case

 

Slim chance that tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); is guilty if FILENAME_CHECKOUT_SUCCESS has been wrongly defined in filenames.php

 

If the emails are not getting sent then the error is above there in the code - you could try inserting exit() statements at vaious places in the file to see where it gets to.

 

 if ($cart->count_contents() < 1) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

Can also be found in the other checkout pages so maybe you are actually getting redirected to one of those ? You could use an add-on in Chrome or FF to watch/record the headers as they come through to see where the redirects are actually going

 

My money is on the payment module though

 

Bib

Link to comment
Share on other sites

thanks.

I have been getting the emails.

It is in test mode at authorize.net.

 

I also thought maybe the after_process... I will look at that again.

I did check that the file name is correct in the filenames.php

 

I guess it is possible it is just the test mode and when I go live it will be fine.

Link to comment
Share on other sites

OK I got IT!

After watching the process I found out it was going to checkout_success.php then redirecting... SO

 

Turns out it was part of the Guest Checkout contribution and me neglecting to modify the checkout_success.php properly.

 

After I commented out the code I forgot to it works fine now.

 

:) thanks for the help Bob

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...