Hi David,
First of all (again) a note that I'm really happy with your script! Although I haven't reached my break even point yet, I'm very happy with all the features and configuration options.
I've got a slight problem with related products...
I've implemented the related feature on this site:
{link saved}
On this page it works quite well. But when there are no related products found, like on:
{link saved}
Nothing is shown and my layout (which depends heavily on the -tags in related.php) becomes quite a mess... Is there a possibility to implement a "No related products found" message?
Kind regards,
Koen
Hi Koen,
html/related.php actually goes on to display html/searchresults.php so what you could do is as follows;
Firstly, in products.php look for the following code around line 120:
if (isset($related)) require("html/related.php");
...and REPLACE with;
if (!isset($related))
{
$searchresults["products"] = array();
}
require("html/related.php");
Then to make sure that the "Related Products" title isn't shown if there are no results, in html/related.php look for the following code at line 1:
<div class='related'><?php print translate("Related Products"); ?></div>
...and REPLACE with:
<div class='related'><?php print (count($searchresults["products"])?translate("Related Products"):""); ?></div>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com