You are here:  » landing page with logos

Support Forum



landing page with logos

Submitted by Paul1107 on Mon, 2011-10-31 12:11 in

Hi David,

I'm looking to do a landing page which only shows merchant logos and maybe merchant names, and maybe even from £ - to £ price label underneath the logo? I envisage that it would be similar to a normal product page from the search results, but with logos instead.

As I already have the voucher codes module installed and a /logos/ file included, I would be just a case of calling them in the search results format.

How would I go about doing that?

cheers

Paul

Submitted by support on Mon, 2011-10-31 16:01

Hi Paul,

The below should be very close to what you describe; save as and browse to landing.php (or however you wish to call it). This makes use of the existing html/searchresults.php to display the results in the same format as product search results with a From... price showing the lowest priced products from that merchant and the link going to search results for all products from that merchant...

<?php
  
require("includes/common.php");
  
$sql "SELECT DISTINCT(merchant) FROM `".$config_databaseTablePrefix."products` ORDER BY merchant";
  
database_querySelect($sql,$rows);
  
$searchresults = array();
  foreach(
$rows as $row)
  {
    
$p["numMerchants"] = 2;
    
$p["name"] = $row["merchant"];
    
$p["image_url"] = $config_baseHREF."logos/".$row["merchant"];
    
$p["productHREF"] = $config_baseHREF."search.php?q=merchant:".urlencode($row["merchant"])."&sort=priceAsc";
    
$sql "SELECT MIN(price) as minPrice
              FROM `"
.$config_databaseTablePrefix."products`
              WHERE merchant='"
.database_safe($row["merchant"])."'
              GROUP BY merchant LIMIT 1"
;
    
database_querySelect($sql,$rows2);
    
$p["minPrice"] = $rows2[0]["minPrice"];
    
$searchresults["products"][] = $p;
  }
  require(
"html/header.php");
  require(
"html/menu.php");
  require(
"html/searchform.php");
  require(
"html/banner.php");
  require(
"html/searchresults.php");
  require(
"html/footer.php");
?>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Paul1107 on Mon, 2011-10-31 18:34

Thanks David!

Not sure whether I am doing this correctly, but saved as landing.php popped it into this directory {link saved}, but only getting a search box.

Forgot to mention that this is going into a wordpress page and the logos should be linked directly to specific page of a merchants site (so manual option would be good if poss) as in the voucher code module I have

Sorry I should have added that initially

regards

Paul

Submitted by support on Tue, 2011-11-01 14:50

Hi Paul,

It could be "externalised" - could you drop me an email with an example of one of your existing external.php calling code sections in place on the WordPress installation where you want it displayed so and I'll convert / work out the calling code required for this..

Cheers,
David.
--
PriceTapestry.com