For a site to sell products which is unique each item.
I want to lock the item if one customer add it to the cart, so nobody else can add it to the cart, if the shopper buy it finally, this item will be removed from the available list, BUT if the customer doesn't buy it, and close the browser, I will release the lock off item, so other customers can begin to add it to the cart.
Lock the item is easy, in the add cart activity, turn the lock flag on. When it is sold, I will set up the item to be archived and removed from the current available list.
If the cutomer removed it from the cart, it is easy too, I will turn the lock flag off.
But How can I release the locked off item if the customers doesn't buy it and quit (close the browser) directly without remove it from the cart before he quit?
How can I know if a customers browser is still open, use session somehow to do that job?