Was thinking it would be an idea in the price column to add script underneath the price with the date that the price on PT was imported - Which file would this need added to and what script would i need to get the DD/MM/YYYY format
just like at Pricerunner
regards
Hi Phil,
Here's what i'd do. Firstly, create new function in includes/tapestry.php called tapestry_priceDate as follows:
<?php
function tapestry_priceDate($merchant)
{
global $config_databaseTablePrefix;
$sql = "SELECT imported FROM `".$config_databaseTablePrefix."feeds` WHERE merchant='".$merchant."'";
database_querySelect($sql,$rows);
return date("d/m/y",$rows[0]["imported"]);
}
?>
Then, you can use that function call in html/prices.php by changing the line that displays the price to something like the following:
<td align='center'><strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br /><small><?php print tapestry_priceDate($product["merchant"]); ?></small></td>
If you want to use a different date format; you simply need to change the first parameter to the date() function in tapestry_priceDate(), as per the date format specification:
http://uk.php.net/manual/en/function.date.php
Hope this helps!