Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hmmn, Cart not emptied after purchase.


wizardsandwars

Recommended Posts

Lately I've noticed that for all of my transactions, my customers carts are not being emptied after the order process is complete.

 

Anyone have an idea where I might looks to trouble shoot this. Obviously, I would think that it has to be somethign in 'checkout_success.php'

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Chris,

 

It looks like emptying of the cart takes place in the checkout_process.php file just before redirecting you to the checkout_success.php file.

 

This is the code I have in my file:

 

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

 

 

I believe the

$cart->reset(true);

section is supposed to clear out the cart. The actual function can be found in the classes/shopping_cart.php file (around lines 80 - 90).

 

I hope this sends you in the right direction.

 

Eric

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...