Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cleaning basket when logging out


drak91

Recommended Posts

Posted

Hello!! I'm searching an addon that does this thing. when one user loggoff, his cart/basket auto-empty. This is because sometimes my clients add to cart one product that I haven't as "available" in my store, but I have the stock set to...7 for example, then the user login 1 month latter and buy this product...and I've problems with this.

I don't want to have to editing the stock of each product ...

 

Regards

Posted

The code in this post should do the job.

 

Regards

Jim

 

Thanks my friend. But what I'm searching is that when the client click on "logout" or close my website(and the cookie expired) the producst are removed from cart, and when the user comes again to my website and "login", the cart is empty. Can you understand me? :P Thanks again!!

Posted

Sorry, I misunderstood what you wanted. The cart will be lost in any case when the cookie expires or is deleted. You can use the code in the post I referenced to clear the cart on logout. Just add it to the logout page instead of a separate page.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

Sorry, I misunderstood what you wanted. The cart will be lost in any case when the cookie expires or is deleted. You can use the code in the post I referenced to clear the cart on logout. Just add it to the logout page instead of a separate page.

 

Regards

Jim

 

 

Thanks!! I've modified my login.php and when the user loginin successfully, then the script redirects to "login2.php", this file contains the code that you said, in this post: http://www.oscommerce.com/forums/topic/320301-cancel-checkout/page__view__findpost__p__1332577

 

And then, every time that the user enter on my shop, the cart is empty :) Now I'm going to install an addon in admin section that removes old cart sessions to clean the database :P

Archived

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

×
×
  • Create New...