You are here:  » Showing products from another installation of PT

Active Forum Topics

Showing products from another installation of PT

Submitted by crounauer on Sun, 2020-01-26 18:03 in

Hi David,

As you know I have a niche site with multiple installations of PT. At the moment I am working to expand "coffee machines" by showing different types of coffee (consumables) suitable for the machines and also a spares (spares) section. These products are drawn from another installation of PT in a subdirectory as follows: -

I have the coffee section up and running - click on the coffee tab here => {link saved}

The question I have is with regards to showing spares. Unlike coffee which can be suitable for many machines, spare parts are usually machine specific.

This is what I have come up with: -

- add the new consumables section as per coffee beans and then to show the specific spares per product - create a new DB table and add spares on a per product basis. This would require some admin work to maintain the spares/products.

Is this the most efficient way to do this or am I making it more complicated than it should be?


Submitted by support on Mon, 2020-01-27 08:57

Hi Simon,

searchExternal.php might be close to all you need - you can access the product name on your product page through $product_main["name"] and use that in the query to the spares installation.

You would need to modify searchExternal.php not to load the includes but to include the remote configuration. To do this, look for the following code beginning at line 44:

  if (!$config_baseHREF)
    if (!function_exists("translate")) require_once($external_path."includes/translate.php");

...and REPLACE with just:


Then in your calling code it would be necessary to clear down the database link variable $database_link before and after and re-load the local configuration - something like;

$external_baseHREF "";
$external_path "/path/to/spares/";
$_GET["q"] = $product_main["name"];