You are here:  » Adding merchant name to results page


Adding merchant name to results page

Submitted by Harvey on Sun, 2006-08-20 22:29 in

(David, sorry for asking so many questions!)

Does anybody know how to get the seller name on the search/results page?

I've tried adding:

<?php
 
print $mainProduct["merchant"]; 
?>

to searchresults.php, but it just doesn't come up. I'd like it to look a bit like Froogle - got the image, description and price, I just need the merchant name (with link to product) in there too.

Cheers

Submitted by support on Mon, 2006-08-21 06:22

Hi Harvey,

Within html/searchresults.php, you need to refer to $product within the loop rather than $mainProduct (which is variable created in the product page HTML module).

So, for example, to display the merchant name below the product description; find the following code (line 20 of searchresults.php):

  <p><?php print substr($product["description"],0,250); ?></p>

...and change it to:

  <p><?php print substr($product["description"],0,250); ?></p>
  <p><?php print $product["merchant"]; ?></p>

You can of course display the merchant name wherever you want within the loop; such as next to the price for example.

Cheers!
David.