Prosperent Alex
01-03-2012, 02:28 AM
This is a simple example of how you can create a niche site using the Prosperent API technology. To accomplish this, we can use the brand filter ('filterBrand') and pass an array of values from which we want to search.
example site: http://www.gamegrabbr.com
$brandArray = array('Sega Genesis','Super Nintendo','Wii');
$api = new Prosperent_Api(array(
'api_key' => <your_api_key>,
'query' => 'something cool',
'enableFacets' => true,
'filterBrand' => $brandArray
));
So now if a visitor queries "panties", no results will be returned (unless sega starts selling them for some reason).
Now if you're still wanting to let your users to be able to filter the results themselves, we could do this instead of the above. (this is what gamegrabbr.com is using).
// if a brand parameter is set then we will filter by that given value (what the user
// is wanting to filter by). if its not set then we filter by the array.
$brands = $params['brand'] ? $params['brand'] : $brandArray;
and our filter would become: 'filterBrand' => $brands
So there you go, maybe this will spark some ideas:)
example site: http://www.gamegrabbr.com
$brandArray = array('Sega Genesis','Super Nintendo','Wii');
$api = new Prosperent_Api(array(
'api_key' => <your_api_key>,
'query' => 'something cool',
'enableFacets' => true,
'filterBrand' => $brandArray
));
So now if a visitor queries "panties", no results will be returned (unless sega starts selling them for some reason).
Now if you're still wanting to let your users to be able to filter the results themselves, we could do this instead of the above. (this is what gamegrabbr.com is using).
// if a brand parameter is set then we will filter by that given value (what the user
// is wanting to filter by). if its not set then we filter by the array.
$brands = $params['brand'] ? $params['brand'] : $brandArray;
and our filter would become: 'filterBrand' => $brands
So there you go, maybe this will spark some ideas:)