Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dump Cart On Exit


thepw

Recommended Posts

Hi there, I hope somebody can help me on this doozy!

 

How do I set OScommerce to dump the cart when a customer exits the website. We do not require this feature

 

Many thanks

Link to comment
Share on other sites

you have no way of knowing when a logged-in customer closes his browser. But you can take advantage of the sessions expiry and via a cron-job or a spider visit you could clear the customers carts if their session expired or with a time difference from the customers_basket_date_added field.

Link to comment
Share on other sites

yes, if you want to disable it totally, edit your catalog\includes\classes\shopping_cart.php. You need to modify the restore_contents function so it will not update the TABLE_CUSTOMER_BASKET (2 tables one is for attributes). Then in add_cart function same file you need to remove the code that stores the products into the these 2 tables.

 

If you have other modules that rely on these tables you may need to customize those too.

 

In this case you shouldn't need anything else, like a cron job as you never store this info.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...