You are here:  » Manual changes to datafeed

Support Forum



Manual changes to datafeed

Submitted by jonny5 on Fri, 2007-10-12 15:13 in

it would be very useful for me to be able to change things in the datafeeds throughout the day (keep them more upto date).

So that a price could be changed etc or maybe a way to verifiy product and price by following link??

im not asking for a solution from you David (unless u have one) but more interested in other peoples thoughts regarding keeping the feeds more upto date as some of the bigger merchants might have a sale for instance but the feed wont be updated for 3 days so all the prices are wrong.

any thoughts???

Submitted by support on Fri, 2007-10-12 18:46

Hi Jonny,

It's a very simple database query to update the price, so here's a quick script that you could edit, upload and then run in the main folder of your Price Tapestry installation whenever you need to update a price...

updatePrice.php:

<?php
  $merchant 
"Widgets Online";
  
$product "Blue Widget";
  
$price "10.99";
  require(
"includes/common.php");
  
$sql "UPDATE products SET price='".database_safe($price)."' WHERE merchant='".database_safe($merchant)."' AND name='".database_safe($product)."'";
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Hope this helps!
Cheers,
David.