Menu

Blended search results

Help
beactive
2004-12-20
2013-04-17
  • beactive

    beactive - 2004-12-20

    How can we get the blended search results. I don't see a place where we can get this. Ho wis this done e.g. I type "Star war" and want to get returned - star wars dvd, toys, books......

     
    • Mauricio Díaz

      Mauricio Díaz - 2005-01-16

      Hi,

      Of course it's possible to get blended search results, but you're right, the docs are terrible, so here's a pseudo-example:

      $aq = new AmazonQuery();
      $query = $aq->query($_GET['q'], "Blended", $_GET['c'], $language, "lite", $_GET['p']);

      if(!$query->getErrorMessage()){
          foreach($query->productLines as $productLine){
              if($productLine != NULL){
                  $productInfo = $productLine->productInfo;
                  echo getCategory($language, $productLine->getMode());
                  foreach($productInfo->details as $product){
                      if($product != NULL)
                          echo $product->getProductName();
                  }
              }
          }
      }

      This example is loosely based on the search results returned by my own site (http://www.madd0.com). I expect blended searches to be a lot easier in the next release.

      Hope it's useful.

      Regards,

      MD

       

Log in to post a comment.