Hi David,
I have the following calling code, and am trying to display more than one category as shown below, but there are no results using that particular query evening though I know those categories exist and if I use each category in isolation, both display products? Can you please tell me where I'm going wrong?
<?php
$external_baseHREF = "{code saved}";
$external_path = "{code saved}";
$external_hideSearch = TRUE;
if (!$_GET["q"] && !$_GET["r"] && !$_GET["merchant"])
{
$_GET["q"] = "category:Party Dresses,evening dresses:";
$_GET["sort"] = "priceDesc";
$_GET["maxPrice"] = "1000";
$_GET["minPrice"] = "10";
}
?>
Thnaks
Paul
thanks David,
before carrying that out, it won't have a knock on effect on the std queries I enter without been preceeded by "category:" such as "floral dress" will it?
Regards
Paul
Hi Paul,
Not at all - they're handled by completely separate code.
Cheers,
David.
--
PriceTapestry.com
ta!
Will the voucher code beta be available on Monday? how can you apply?
Cheers
Hi Paul,
It will be available as an option on the download page...
Cheers,
David.
--
PriceTapestry.com
David, just going back to my original issue for a sec. I've made the changes as per above, and I have products displaying ok, but as far as I can see it is still only from one category which is the "party dresses" category? any ideas?
Thanks
Hi Paul,
It may be down to the sort - can you try swapping the order; e.g.
$_GET["q"] = "category:evening dresses,Party Dresses:";
...that should reveal whether it's a coding issue...
Cheers,
David.
--
PriceTapestry.com
Hi David,
I've tried your suggestion, but the output is still the same "party dresses"?
cheers Paul
Hi Paul,
Can you try "evening dresses" on it's own / double check that there are actually products being returned for that exact category name. Although it shouldn't matter, for consistency keep the case consistent throughout, so if the category name is Party Dresses use "Party Dresses" in the value for $_GET["q"]... Drop me an email with the URL and the usual required info (full calling code etc.) and I'll check it out if you're not sure...
Cheers,
David.
--
PriceTapestry.com
Hi David
Hope you don't mind a follow up on this, but trying use the same calling code for a particular search.
I'm trying to extract products from one feed, I know the products are there but there's no category, they're just lumped in with an general category, the query would be the brand name "Rise Elite" which I think is in the product title.
The calling code is the following
<?php
$external_baseHREF = "{code saved}";
$external_path ="{code saved}";
$external_hideSearch = TRUE;
$_GET["q"] = "?????????????:merchant:Dorthy Perkins:";
$_GET["sort"] = "priceDesc";
$_GET["maxPrice"] = "1000";
$_GET["minPrice"] = "10";
require($external_path."external.php");
?>
What would you recommend?
Cheers
Paul
Hi Paul,
If you email me your latest external.php I'll add support for, e.g.
Cheers,
David.
--
PriceTapestry.com
Hi Paul,
In your external.php, search for this code around about line 371:
$where .= " ".$field." = '".database_safe($parts[$i])."' ";
To support multiple, comma-separated categories (or by virtue of it being the same code, merchants or brands also), REPLACE the above with:
$whereParts = explode(",",$parts[$i]);
$wheres = array();
foreach($whereParts as $wherePart)
{
$wheres[] = " ".$field." = '".database_safe($parts[$i])."' ";
}
$where .= " ( ".implode(" OR ",$wheres)." ) ";
Cheers,
David.
--
PriceTapestry.com