You are here:  » UK Affiliate Networks - datafeed and price comparison

Support Forum



UK Affiliate Networks - datafeed and price comparison

Submitted by redspan on Fri, 2007-11-09 19:14 in

Hello,

Having got a site up and running, it's apparent that there aren't that many price comparisons in my chosen niche.

I've chosen clothes, shoes, and accessories. You'd think that there would be plenty of datafeeds to populate the site and plenty of price comparison as a consequence, but that's not the case. I have 121 xml files listing 131,628 products, but most of the products are unique, or seem to be.

Is there a way of finding which products are available from two or more sources?
I could then use these as my features products and give what the site is designed to give i.e. price comparisons.

Is the niche too small?
I could extend into health and beauty on the same site, but who's to say that the lack of comparison would continue? Many merchants offering feeds to do with their own branded products.

Comments?

Regards,
Ben

Submitted by support on Sat, 2007-11-10 09:39

Hello Ben,

A lot of people use Price Tapestry as a generic datafeed script, sometimes just with one merchant, as it's very easy to change the wording around to remove the price comparison feel from the site.

You're right however, true price comparison works best where brand name products are sold by a number of merchants, using almost identical product names so in this respect the niche may be too small for good price comparison.

> Is there a way of finding which products are available from two or more sources?

Here's a quick script i've written to do this for you. Upload this to your Price Tapestry installation directory, and it will scan the products table and display and products available from more than one merchant. It may take a while to run...

multi.php

<?php
  set_time_limit
(0);
  require(
"includes/common.php");
  
$sql "SELECT name , COUNT( id ) AS numMerchants FROM `".$config_databaseTablePrefix."products` GROUP BY name";
  
$link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);
  @
mysql_select_db($config_databaseName,$link);
  
$result mysql_unbuffered_query($sql,$link);
  if (
$result)
  {
    while(
$row mysql_fetch_array($result,MYSQL_ASSOC))
    {
      if (
$row["numMerchants"] > 1) print "<p>".$row["name"]."</p>";
    }
  }
?>

Hope this helps!
Cheers,
David.

Submitted by paddyman on Sat, 2007-11-10 15:57

Nice addition to have.

Great Work :)

Adrian

Submitted by redspan on Sun, 2007-11-11 15:37

It helps a lot! Thanks David.

Submitted by wilkins on Tue, 2007-11-13 14:06

hi david

Is there any other way to get these results as my browser times out due to to many items.

Thanks

Brent

Submitted by support on Tue, 2007-11-13 17:27

Hi Brent,

Are you getting no output at all? Something that might help is to flush() the output after every product, which should ensure that the browser received something...

<?php
  set_time_limit
(0);
  require(
"includes/common.php");
  
$sql "SELECT name , COUNT( id ) AS numMerchants FROM `".$config_databaseTablePrefix."products` GROUP BY name";
  
$link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);
  @
mysql_select_db($config_databaseName,$link);
  
$result mysql_unbuffered_query($sql,$link);
  if (
$result)
  {
    while(
$row mysql_fetch_array($result,MYSQL_ASSOC))
    {
      if (
$row["numMerchants"] > 1) print "<p>".$row["name"]."</p>";
      
flush();
    }
  }
?>

If this makes no difference, are you able to access your server from the command line (e.g. via SSH)?

Cheers,
David.

Submitted by wilkins on Tue, 2007-11-13 19:45

Hi David

It still times out, I do have access to server via command line.

Thanks

Brent

Submitted by support on Wed, 2007-11-14 09:53

Hi Brent,

If you do have access to your server the easiest thing to do is to run the script directory; so after logging in, use something like:

$cd path/to/pricetapestry
$php multi.php > multi.txt

(where $ is your command prompt)

Then, you can either view multi.txt online using:

$more multi.txt

...or alternatively download the file to view locally.

Cheers,
David.