Hi David,
I am successfully using external.php using the folloiwng calling
<?php
if (is_single()) {
?>
<?php
$external_baseHREF = "http://www.domain.com.au/prices/";
$external_path = "/home/user/public_html/prices/";
$external_noSearchform = TRUE;
$external_noBanner = TRUE;
$external_noNavigation = TRUE;
$_GET["q"] = single_post_title('',false);
require($external_path."external.php");
?>
<?php
}
?>
This will display external.php on single posts using the post title as the search term, for some reason I cannot get priceExternal.php to also work.
is it the case of using require($external_path."pricesExternal.php"); in the aboive code?
How does pricesExternal differ from external? What I am trying to get is a post that just contains the merchant data and price where it can be bought, clicking the link would take them straight to the merchant, all this from within the wordpress post. This sort of works with external.php but there is an extra step involved of click merchant name and then buy.
Hope this makes sense
Richard
Hi David,
Thanks for that, for some reason when i change to $_GET["product"] = single_post_title('',false);
or even $_GET["product"] = "Search Term"; I dont not get any results, but $_GET["q"] = single_post_title('',false); works fine.
Would the product search be stricter in the results it find?
I also already use the following flags
$external_noSearchform = TRUE;
$external_noBanner = TRUE;
$external_noNavigation = TRUE;
What other ones are avaialble to retrict content returned
Thanks
Richard
Hi Richard,
$_GET["product"] should be used with external.php to display the product page / price comparison table; $_GET["q"] should be used with pricesExternal.php to display the price comparison table.
With $_GET["q"] using external.php I would expect to see search results - is that what you are seeing?
The output suppression flags you mentioned are the only ones supported, but more could be added if you wanted the product display without, say image, description etc.
Cheers,
David.
--
PriceTapestry.com
Hi David,
Sorry for the confusion,
The following is working fine
<?php
$external_baseHREF = "http://www.com.au/prices/";
$external_path = "/home/user/public_html/prices/";
$external_noSearchform = TRUE;
$external_noBanner = TRUE;
$external_noNavigation = TRUE;
$_GET["q"] = single_post_title('',false);
require($external_path."external.php");
?>
The changed code below does not seem to be working
<?php
$external_baseHREF = "http://www.com.au/prices/";
$external_path = "/home/user/public_html/prices/";
$external_noSearchform = TRUE;
$external_noBanner = TRUE;
$external_noNavigation = TRUE;
$_GET["product"] = single_post_title('',false);
require($external_path."external.php");
?>
Thanks
Richard
Hi David,
I have noticed it works if I use an exact product name such as
$_GET["product"] = "Best of Lonely Planet Travel Writing";
Is there a part of product search that requires exact match?
Regards
Richard
Hi Richard,
$_GET["product"] must be an exact product name - that's how you get the product page / price comparison table to display with external.php.
When you use $_GET["q"], external.php does the equivalent of search.php within Price Tapestry, and so an exact match is not required...
Cheers,
David.
--
PriceTapestry.com
Hi Richard,
The external.php equivalent to pricesExternal.php is the product page, which you trigger by using $_GET["product"] instead of $_GET["q"], e.g.
$_GET["product"] = single_post_title('',false);
However, that will display the entire product page content - image, description, price comparison table and related products (if configured). These can be disabled with flags similar to the $external_noSearch etc., so let me know if you wanted to do that.
Alternatively, to implement pricesExternal.php instead, simply replace each instance of $external_ with $common_ in your calling code and that should work as expected (no need for the $external_no... flags as these aren't used by pricesExternal.php) - and it uses $_GET["q"] not $_GET["product"]...
<?php
$common_baseHREF = "http://www.domain.com.au/prices/";
$common_path = "/home/user/public_html/prices/";
$_GET["q"] = single_post_title('',false);
require($common_path."pricesExternal.php");
?>
Cheers,
David.
--
PriceTapestry.com