You are here:  » how to publish my feed to froogle

Support Forum



how to publish my feed to froogle

Submitted by chiquita on Thu, 2007-07-19 22:44 in

hi all:
I would like to create a feed with all the products on my price tapestry site so I can submit it to google for the extra traffic. I do not want to land people on the merchant landing urls but my own landing urls. How can I create a export file that has my own site landing url?

Submitted by support on Fri, 2007-07-20 06:53

Hi,

It's quite easy to make a dump of all the products on your site, here's a sample file taken from another thread modified to include the product name as a "CSV" file:

<?php
  
require("includes/common.php");
  
header("Content-Type: application/octet-stream");
  
header("Content-Disposition: attachment; filename=urllist.txt");
  
$sitemapBaseHREF "http://".$_SERVER["HTTP_HOST"].$config_baseHREF;
  
$sql "SELECT name FROM `".$config_databaseTablePrefix."products`";
  
$link mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);
  
mysql_select_db($config_databaseName,$link);
  
$result mysql_unbuffered_query($sql,$link);
  while(
$row mysql_fetch_array($result,MYSQL_ASSOC))
  {
    if (
$config_useRewrite)
    {
      
$sitemapHREF "product/".urlencode(str_replace(" ","-",$row["name"])).".html";
    }
    else
    {
      
$sitemapHREF "products.php?q=".urlencode($row["name"]);
    }
    print 
$name.",".$sitemapBaseHREF.$sitemapHREF."\n";
  }
?>

Hope this helps!
Cheers,
David.