You are here:  » Search External / Prices External

Active Forum Topics


Search External / Prices External

Submitted by support on Tue, 2008-09-16 16:12 in

Hi everyone;

The External Scripts enable you to display search results and price comparison tables from your Price Tapestry database within any other PHP script running on the same server.

Search Results

SearchExternal.zip

Unzip, and upload SearchExternal.php to your Price Tapestry installation folder. Then, to show search results within any other PHP script running on the same web server (it doesn't have to be the same domain name or even a sub-domain, it can be completely different), simply insert the following PHP code into your script:

<?php
  $external_baseHREF 
"http://www.example.com/pricetapestry/";
  
$external_path "/path/to/pricetapestry/";
  
$_GET["q"] = "Search Terms";
  require(
$external_path."searchExternal.php");
?>

The values for $external_baseHREF and $external_path can be found on the Support Info page of your Price Tapestry /admin/ area as Base HREF and Install Path respectively.

Simply edit "Search Terms" to be the query you want to include search results for. Remember that you can use the various search modifiers; for example "merchant:Merchant-Name" or "category:Category-Name" or "brand:Brand-Name" etc.

Price Comparison Tables

PricesExternal.zip

Unzip, and upload pricesExternal.php to your Price Tapestry installation folder. Then, to show price comparison tables within any other PHP script running on the same web server (it doesn't have to be the same domain name or even a sub-domain, it can be completely different), simply insert the following PHP code into your script:

<?php
  $external_baseHREF 
"http://www.example.com/pricetapestry/";
  
$external_path "/path/to/pricetapestry/";
  
$_GET["q"] = "Product Name";
  require(
$external_path."pricesExternal.php");
?>

The values for $external_baseHREF and $external_path can be found on the Support Info page of your Price Tapestry /admin/ area as Base HREF and Install Path respectively, and edit "Product Name" to be the query you want to include search results for.

Submitted by bat on Fri, 2018-06-01 20:12

Is this still valid for the 16/10A release? Mine hasn't worked since I updated site to that version.

Submitted by support on Sat, 2018-06-02 07:31

Hi,

I've just double checked and both are working fine against the latest distributions however I have just added category hierarchy support to searchExternal.php.

If they're still not working as expected, try enabling error reporting by adding the following lines to the calling code:

  ini_set('display_errors','on');
  error_reporting(E_ALL);

Then try the script again. If an error is displayed but you're not sure where the problem lies let me know the output, or of course if there is no difference, and I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com