Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Sign in to follow this  

Count down problem and solution

Recommended Posts

I was having some countdown problem, time left was not correct and it was off for about 1 hour.

On the French version of this contrib. there is another script to do countdown.

For me it fixed the problem. You will need some skill in PHP to replace this code with existing one. I cannot give you the full code because mine is highly customized already. If the countdown works fine for you just ignore it.




$datetime_count_down = strtotime($auctions['expires_date'])-time();
$jours = floor($datetime_count_down/86400);
$heures = floor(($datetime_count_down/3600)-($jours*24));
$minutes = floor(($datetime_count_down/60)-($jours*1440+$heures*60));
$secondes = floor($datetime_count_down-($jours*86400+$heures*3600+$minutes*60));
if (strtotime($auctions['expires_date'])>time()){
echo '<font style="font-weight: bold;" color="#ff0000">' . TEXT_DATETIME_LEFT. ' ' . $jours.'d '.$heures.'h '.$minutes.'m '.$secondes.'s</font>';
} else {
echo '<font style="font-weight: bold;" color="#ff0000">Countdown Complete</font>'; 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this