You are here:  » time date of update

Support Forum



time date of update

Submitted by wilkins on Sat, 2010-04-10 18:55 in

hi David

Is it possible to show time and date of the update on the product page.

Brent

Submitted by support on Sun, 2010-04-11 08:01

Hi Brent,

Sure - the imported time can be looked up with reference to $mainProduct["merchant"] in html/product.php. To display "(updated ____)" after the Best Price: list, look for the following code on line 32:

<?php endforeach; ?>

...and REPLACE with:

<?php endforeach; ?>
<?php
  $sql = "SELECT imported FROM `".$config_databaseTablePrefix."feeds`
            WHERE merchant='".database_safe($mainProduct["merchant"])."'";
  database_querySelect($sql,$rows);
  $updated = date("Y-m-d H:i:s",$rows[0]["imported"]);
  print "<br /><small>(updated ".$updated.")</small>";
?>

Cheers,
David.