daves
03-07-07, 01:09
Can someone give me a simple bit of code to return a list of products based on a simple search...?
Using this as my base code (this returns random hotpickproducts):
//new client
$oClient = new api_client();
//set the paremeters
$aHotPicksParams = array('iCategoryId'=> 0, 'sSort'=> 'random', 'iLimit'=> 10, 'iOffset'=> 0);
//make the SOAP call
$oHotPicks = $oClient->call('getHotPickProductList', $aHotPicksParams);
//get the products array
$aProducts = $oHotPicks->getHotPickProductListReturn;
//print each product name to the page
foreach ($aProducts as $oProduct) {
echo $oProduct->sName;
echo '<br />';
}
So what i am after is the code (like above) but that uses the "searchProduct" call with relevant parameter settings for a simple search.
Does this make sense to anyone!? I dont need any fancy output..just the basic product info returned and printed to screen....
Any ideas anyone!?
Cheers
Dave
Using this as my base code (this returns random hotpickproducts):
//new client
$oClient = new api_client();
//set the paremeters
$aHotPicksParams = array('iCategoryId'=> 0, 'sSort'=> 'random', 'iLimit'=> 10, 'iOffset'=> 0);
//make the SOAP call
$oHotPicks = $oClient->call('getHotPickProductList', $aHotPicksParams);
//get the products array
$aProducts = $oHotPicks->getHotPickProductListReturn;
//print each product name to the page
foreach ($aProducts as $oProduct) {
echo $oProduct->sName;
echo '<br />';
}
So what i am after is the code (like above) but that uses the "searchProduct" call with relevant parameter settings for a simple search.
Does this make sense to anyone!? I dont need any fancy output..just the basic product info returned and printed to screen....
Any ideas anyone!?
Cheers
Dave