You are here:  » Multiple search external issue


Multiple search external issue

Submitted by PHILDARV on Sat, 2016-05-07 17:23 in

Hi David

I'm integrating a multiple site strategy and using the searchexternal script to bring in data from the different sites onto 1 home page,

So on the home page i have these:

<?php
  $external_baseHREF 
"{code saved}";
  
$external_path "{code saved}";
  
$_GET["q"] = "Rotary";
  require(
$external_path."searchexternal.php");
?>

<?php
  $external_baseHREF 
"{code saved}";
  
$external_path "{code saved}";
  
$_GET["q"] = "driving";
  require(
$external_path."searchexternal.php");
?>

which are requesting data from 2 different databases on the same server, however the search results on the second site bring in products from the first search external - Is there an "unset" that I need to do following each search to clear previous results?

Thanks

Submitted by support on Sun, 2016-05-08 10:27

Hello Phil,

searchexternal.php just needs to be modified slightly so that config.php is reloaded for every instance. Look for the following code around line 42:

  if (!$config_baseHREF)
  {
    require_once($external_path."config.php");

...and REPLACE with:

  require_once($external_path."config.php");
  if (!isset($config_nicheMode))
  {

Cheers,
David.
--
PriceTapestry.com