Hi David,
I've included a product page onto wordpress using the same principles as before - the following code on the post:
"
<?php
// now preload $_GET["q"] to be the query you want to display search results for
$_GET["q"] = "In the Night Garden Talking Plush Upsy Daisy";
// now bring in the search code
require(ABSPATH. '/shop/products.php');
// now use Price Tapestry's product HTML module to display the results
require(ABSPATH. '/shop/html/product.php');
?>
- and listing the globals at the top of products.php.
It's all working except for the following error:
"Price:
Warning: Invalid argument supplied for foreach() in /home/gift/public_html/shop/html/product.php on line 24"
That line is:
<?php
foreach($product["products"] as $priceProduct):
?>
Thanks!
Cheers David, makes it much easier to stick it on Wordpres etc :)
Hello Harvey,
I have made lots of improvements to the way this worked and posted some new code - have a look at the following thread and if you move your code to use those versions it should work much better:
http://www.pricetapestry.com/node/2289
Cheers,
David.