is it possible to have 2 installations of price tapestry , one for UK retailers and one for USA retailers , then on the main site a tick box or drop down menu that you choose which country to search?
On one of my small sites i seem to be getting a lot of Traffic from the USA so would like to give them USA products
top man , will give it a go and see what happens :)
Hi David,
Is there a way to search both simultaneously?
For example, to have a drop down show, as in this example, show USA, UK, and BOTH?
Hi Steven,
It would be possible with a lot of modification; but i'm afraid there's no easy way to simply merge a query across 2 separate databases.
Cheers,
David.
David,
Can you provide a summary of the modifications needed to make a project such as this work, or if it is not too much to ask, detailed instructions.
David, have you thought this possibility over? Many figured a simpler way to query across two separate databases.
Hi,
I'm afraid this would be really difficult to achieve using the existing code base, as the changes would be substantial - it's the sort of project that is better suited to starting from a clean slate.
Sorry...
Cheers,
David.
Hello Jonny,
Sure, the easiest way to do this would be install Price Tapestry in 2 sub-directories, for example:
http://www.example.com/uk/
http://www.example.com/usa/
Then on your home page (index.php), add the following PHP code at the very top:
<?php
if ($_POST["submit"] == "Search")
{
$url = "/".$_POST["country"]."/search.php?q=".$_POST["q"];
header("Location: ".$url);
exit();
}
?>
...and then use the following HTML for the main search form:
<form method='POST'>";
<input type='text' name='q' /> ";
<select name='country'>";
<option value='uk'>UK</option>";
<option value='usa'>USA</option>";
</select>";
<input type='submit' name='submit' value='Search' />";
</form>";
Hope this helps!
Cheers,
David.