PDA

View Full Version : why cant i recieve any items from zavvi???


ljackson09
30-10-09, 22:23
hi all,

i hope someone can help me, i have the following code
$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = '245';
$oRefineByDefinition -> sName = 'CDs';
$oRefineBy -> oRefineByDefinition = $oRefineByDefinition;

$aParams = array("sQuery" => " Kings Of Leon Only By The Night", "iAdult" => 1, "iMerchantId" => "2549", "oActiveRefineByGroup" => $oRefineBy);
$oResponse= $oClient->call('getProductList', $aParams);

print_r($oResponse);

but nothing? i have tried many different searches andd never recieve any zavvi items, am i doing something wromg?

i have signed up to them and its still active?

any help would be appreciated
many thanks
Luke

crounauer
30-12-10, 23:06
Hi Luke,
I know this reply is very late, but I have just started with V3 and thought I would make some contributions!


define('API', 'PS');
require_once('constants.inc.php');
require_once('includes/classes/class.ClientFactory.php');

$oClient = ClientFactory::getClient();

// Example refine by structure
// Refine by Merchant (3)
$oRefineBy = new stdClass();
$oRefineBy->iId = 3;
$oRefineBy->sName = '';

// Refine by merchant 1599
$oRefineByDefinition = new stdClass();
$oRefineByDefinition->sId = 2549;
$oRefineByDefinition->sName = '';
$oRefineBy->oRefineByDefinition = $oRefineByDefinition;

// Columns to return
$returnedcolumns = array(sAwImageUrl,sDescription,sBrand,iMerchantId, iCategoryId);
$aParams = array("sQuery" => "Kings Of Leon Only By The Night", "bAdult" => false, "iLimit" => 40, "sColumnToReturn" => $returnedcolumns, "oActiveRefineByGroup" => $oRefineBy);
$oResponse= $oClient->call('getProductList', $aParams);

foreach($oResponse->oProduct as $details) {
echo '<p><img src="'.$details->sAwThumbUrl.'" /> <a href="'.$details->sAwDeepLink.'">'.$details->sName.'</a> - '.sprintf("%.2f",$details->fPrice).'</p>';
}

//print_r($oResponse);

Thanks,
Simon