You are here:  » Product Description


Product Description

Submitted by searley on Tue, 2006-02-14 16:11 in

If you take a look at http://www.shoppingchanneluk.com/search.php?q=AEG+A70128GS

There are 3 items with the same product name, only 2 have a description..

upon cliching on one of them.. say: http://www.shoppingchanneluk.com/product/AEG-A70128GS.html because the cheapest one has no description nothing is shown.. any way around that?

Submitted by Eddie on Tue, 2006-02-14 16:17

Ask merchant for a better feed !

Submitted by support on Tue, 2006-02-14 16:23

You could pick up the description from a more expensive listing if you wished; however i'm not sure how "safe" this is as it would create a disconnect between the merchant providing the description and the merchant getting the "Best Price XXX.XX from ..." link.

There is also the case where multiple products appear on the same product page but are not actually the same thing; for example "Football Table" could refer to a low cost table top toy; or an expensive free-standing product.

Anyway, the code to pick up a description from another result could work as follows (this is OTTOMH, but should work OK):

(in products.php, first line is existing code)

<?php
$product 
$rows[0];
if (!
$product["description"])
{
  
// if no description, scan through additional results to pick one up
  
foreach($rows as $row)
  {
    if (
$row["description"])
    {
      
$product["description"] = $row["description"];
      break;
    }
  }
}
?>

Submitted by support on Tue, 2006-02-14 16:28

I would take it further, and credit the merchant providing the description and including their Buy URL, as well as the best price Buy URL. This could be done as follows:

<?php
$product 
$rows[0];
if (!
$product["description"])
{
  
// if no description, scan through additional results to pick one up
  
foreach($rows as $row)
  {
    if (
$row["description"])
    {
      
$product["description"] = $row["description"];
      
// credit the merchant providing the description and provide their buy URL
      
$product["description"] .=
        
" (description provided by <a href='".$row["buy_url"]."'>".$row["merchant"]."</a>)";
      break;
    }
  }
}
?>