You are here:  » Integarate ebay into results

Support Forum



Integarate ebay into results

Submitted by wilkins on Mon, 2010-03-29 08:21 in

Hi David

I am putting ebay into our results using the script and require in search.php, and its working OK, my question is is there any way to get the ebay results to be displayed in 2 columns rather than one. Also I am going to include Amazon on the same page, would there be any conflicts by using ebay also?

Thanks

Brent

Submitted by support on Mon, 2010-03-29 08:41

Hi Brent,

To display eBay results in 2 columns; try the following as a complete replacement for the myEbayRecordHandler function in ebay.php:

  function myEbayRecordHandler($item)
  {
    global $config_currencyHTML;
    global $ebay_columns;
    if (!$ebay_columns)
    {
      print "<tr>";
    }
    print "<td>";
    print "<img width='80' src='".$item["GALLERYURL"]."' />";
    print "</td>";
    print "<td width='50'>&nbsp;</td>";
    print "<td valign='middle'>";
    print "<h4><a href='".$item["VIEWITEMURL"]."'>".$item["TITLE"]."</a></h4>";
    print "</td>";
    print "<td width='50'>&nbsp;</td>";
    print "<td valign='middle' align='center'>";
    print $config_currencyHTML.tapestry_decimalise($item["SELLINGSTATUS/CURRENTPRICE"])."<br />";
    print "<nobr><a href='".$item["VIEWITEMURL"]."'>More Information</a></nobr>";
    print "</td>";
    $ebay_columns++;
    if ($ebay_columns == 2)
    {
      print "</tr>";
      $ebay_columns = 0;
    }
  }

amazon.php and ebay.php can both be called on the same page after replacing the following line in each file:

  require("includes/MagicParser.php");

...with:

  require_once("includes/MagicParser.php");

Hope this helps!

Cheers,
David.