Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

countdown of date available


Recommended Posts



I'm selling preorder products, I would like to have a countdown before the release date.


I have found the function but don't know how to intergrate with the products_date_available.


this is the countdown php code




$target = mktime(0, 0, 0, 2, 10, 2007);
$today = time ();
$difference =($target-$today);
$days =(int) ($difference/86400);
print "Our event will occur in $days days";




This is the code product available code





Any php expect, please help

Link to comment
Share on other sites

Wouldn't call myself an expect but if you look in product)info.php you wll see the way to reference the field is to use




Google on php and how to find the difference between 2 date and you will find code to do this.


You might also need something like this.



if ($difference >0){

echo "<br>This product will be available in $difference days.<br>";

} else {

echo "<br>This product is already available.<br>";


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile


Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.


For links mentioned in old answers that are no longer here follow this link Useful Threads.


If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites


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

  • Create New...