You are here:  » Additional Merchant Info


Additional Merchant Info

Submitted by SimonK on Mon, 2011-03-07 21:22 in

I'd like to display some additional info about the merchants in the price comparison table.

Was planning on modding the database to store this in the same place as the logo. But I can't see where that is!

What's the easiest way to go about this please? I'd like to store info like a star rating, and whether they offer free delivery etc. Then show this info along side the prices on the price comparison for a product.

Thanks
Simon

Submitted by support on Tue, 2011-03-08 09:00

Hi Simon,

Easiest approach is probably almost exactly the same method as used to create custom descriptions described in this thread.

Create a folder on your site called merchantinfo/

Inside that folder, create .html files containing your additional merchant information, with filenames of Merchant Name.html (including spaces).

Then, in html/prices.php you can pull in your additional merchant info within the loop that creates each price row as follows:

<?php
  $merchantinfoFilename 
"merchantinfo/".$product["merchant"].".html";
  if (
file_exists($merchantinfoFilename))
  {
    require(
$merchantinfoFilename);
  }
?>

If you're not sure exactly where within html/prices.php to use the above code; describe where you'd like your merchant info text to be displayed in relation to the existing columns (Stockist, Catalogue Product Name etc.) and I'll work out the positioning for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by SimonK on Thu, 2011-03-10 20:57

Thanks David :-)

There was a spurious bracket I had to remove from the above code so if anyone else wants to use it, here's the corrected version:

<?php
  $merchantinfoFilename 
"merchantinfo/".$product["merchant"]).".html";
  if (
file_exists($merchantinfoFilename))
  {
    require(
$merchantinfoFilename);
  }
?>

Submitted by support on Fri, 2011-03-11 08:49

Ooops - thanks, Simon - corrected above also.

Cheers,
David.
--
PriceTapestry.com