You are here:  » Search results


Search results

Submitted by RBEVAN on Fri, 2016-06-17 15:23 in

Hello
Please could could you advise...I would like to use just the search results pages and not individual product pages...how would I go about this?

Site I'm working on is {link saved}

Thanks, Richard

Submitted by support on Fri, 2016-06-17 15:26

Hi Richard,

To have search results link directly to the merchant, in search.php look for the following code at line 493:

$searchresults["products"][$k]["productHREF"] = tapestry_productHREF($searchresults["products"][$k]);

...and REPLACE with:

$searchresults["products"][$k]["productHREF"] = tapestry_buyURL($searchresults["products"][$k]);

Cheers,
David.
--
PriceTapestry.com

Submitted by RBEVAN on Fri, 2016-06-17 15:33

Not quite right...links to the search page

Submitted by support on Fri, 2016-06-17 15:35

Hi,

Ah - sorry about that, you would get a link to the home page if not using tracking ($config_useTracking in config.php) since buy_url is not included in the SELECT SQL within search results.

If you wanted to use tracking, enable by changing line 12 in config.php as follows:

  $config_useTracking = TRUE;

Otherwise, if you'd prefer your links to go direct to the affiliate link, edit search.php and look for the following code at line 476:

      $sql2 = "SELECT id,name,normalised_name,image_url,description,price,rating FROM `".$config_databaseTablePrefix."products` WHERE id IN (".$in.")";

...and REPLACE with:

      $sql2 = "SELECT id,name,normalised_name,image_url,description,price,rating,buy_url FROM `".$config_databaseTablePrefix."products` WHERE id IN (".$in.")";

Cheers,
David.
--
PriceTapestry.com

Submitted by RBEVAN on Fri, 2016-06-17 15:41

That's it thank you