Hi David
wondered whether you can help me out?
you helped amend my external.php to with a switch statement so I could display rows of items from a specific merchant and an other parameter using the follow query
switch($content)
{
/* begin copy */
case "a":
$sql = "SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants FROM `".$config_databaseTablePrefix."products` WHERE merchant='Lipsy' AND category LIKE 'Party Dresses' GROUP BY name ORDER BY RAND() LIMIT 6";
break;
I've got 18 cases included in the switch statement from a-r at the moment, and the results fetched using the following calling code:
<?php
$external_baseHREF = "{code saved}";
$external_path = "{code saved}";
$external_hideSearch = TRUE;
$_GET["content"] = "i";
require($external_path."external.php");
$_GET["content"] = "";
?>
The problem is that cases "r" "l" & "j" don't produce output, can you hazard a guess why when all the other cases work fine?
Regards
Paul
Hi David,
Thanks for that, honestly thought I was putting correct parameters in, but after following your advise it now works...
Thanks again
Paul
Hi David
Could you please email me that external.php file.
I am trying to integrate pt with wordpress.
Hi,
Sure - what I normally suggest is first to implement either pricesExternal.php or searchExternal.php as documented here, and then email me the calling code that you derived for your installation, and then I can use that to send you the full version and calling code required...
Cheers,
David.
--
PriceTapestry.com
Hi Paul,
It's almost certainly just that the WHERE condition is not returning any products - double check the conditions by searching manually within the associated Price Tapestry installation for the results you want using the following query style:
merchant:Lipsy:category:Party Dresses
...and once you're getting the results you want, copy the merchant and category fields exactly from your search box into the SQL - that should be all it is...
Cheers,
David.
--
PriceTapestry.com