Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Advanced countdown timer
08-07-2010, 12:13 PM #1
- Join Date
- Aug 2010
- Thanked 0 Times in 0 Posts
Advanced countdown timer
Hopefully someone will be able to help me here. I found the below script that works fine for the actual countdown, but when the user refreshes the page, the countdown starts from 5 minutes again.
What I am trying to do, is handle users that put something in their shopping cart and then get side tracked or what ever reason and that same product then being purchased by another person when I only have 1 left.
So using PHP I am going to subtract the qty of that product by 1 and then I want the website to either put it back, if the users checkout times out, or if a normal process it is taken out permanently.
Your help is greatly appreciated.
<span id="countdown"> </span>
08-07-2010, 12:53 PM #2
- Join Date
- Jun 2002
- London, England
- Thanked 2,596 Times in 2,574 Posts
You need to check the availability of the product at the moment of checkout to avoid the one single item being purchased by two customers.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.