PDA

View Full Version : please help to use sColumnToReturn not returning any products when using.


ljackson09
24-12-09, 19:45
Hi All

i am trying to get the below code to work but since ive added sColumnToReturn in the parameters have i used it correctly???

$returnedcolumns = array(iId,iMerchantId,iAdult,sName,sAwDeepLink,sAw ThumbUrl,fPrice);
$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = $AW_catid;
$oRefineByDefinition -> sName = $AW_cat;
$oRefineBy -> oRefineByDefinition = $oRefineByDefinition;

$aParams = array("sQuery" => "call of duty modern warefare 2", "sColumnToReturn" => $returnedcolumns, "bIncludeTree" => true, "oActiveRefineByGroup" => $oRefineBy);
$oResponse= $oClient->call('getProductList', $aParams);
$iTotalCount = $oResponse->iTotalCount; // get the total count before the next call


many thanks
and merry christmas all!!!!

Luke

Andy
27-12-09, 12:37
hi
Try encapsulating your returned columns list with single quotes. I beleive sw expects an array of strings, but if thats your actual code, its receiving an array of undefined variables

Andy
27-12-09, 23:27
I posted before from my phone so couldn't elaborate. In case of any doubt, what I meant was: try this:


$returnedcolumns = array('iId','iMerchantId','iAdult','sName','sAwDee pLink','sAwThumbUrl','fPrice');
:D

ljackson09
06-01-10, 19:55
cheers mate managed to get it working :D