ljackson09
08-02-10, 15:39
Hi All,
I am making several calls to the api which were fine up until today, for some reason they've messed up.
e.g when looking for cds using the following
$aw_id = "241";
$aw_name = "Music";
$keywords = "cd -christmas";
#GET TOP 5 ITEMS FOR EACH CATEGORY
$AW_catid = $aw_id;
$AW_cat = $aw_name;
$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = $AW_catid;
$oRefineByDefinition -> sName = $AW_cat;
$oRefineBy -> oRefineByDefinition = $oRefineByDefinition;
$returnedcolumns = array(iCategoryId, sBrand, sModel, iMerchantId, sAwImageUrl, fStorePrice, sAwThumbUrl, sName,sAwImageUrl,sMerchantImageUrl,sMerchantThumb Url,sDescription,sBrand);
$booleansearch = array('sQuery'=> $keywords, 'oActiveRefineByGroup' => $oRefineBy, 'iAdult' => 1, 'iLimit'=>10, 'sColumnToReturn' => $returnedcolumns, 'sMode' => 'boolean');
$oResponse= $oClient->call('getProductList', $booleansearch);
#print_r($oResponse);
$count = 0;
foreach($oResponse->oProduct as $oProduct)
{
$prodName = $oProduct->sName;
$img = htmlspecialchars($oProduct->sMerchantImageUrl);
$img2 = htmlspecialchars($oProduct->sAwThumbUrl);
$price = $oProduct->fPrice;
$link = htmlspecialchars($oProduct->sAwDeepLink);
$store = $oProduct->iMerchantId;
$catid = $oProduct->iCategoryId;
$desc = $oProduct->sDescription;
$merchantid = $oProduct->iMerchantId;//the id i am trying to get the store name for
$model = $oProduct->sModel;
$brand = $oProduct->sBrand;
$short_title = $prodName;
print $short_title;
}
yesterday i was recieving good results such as lady gaga -the fame, jls -jls etc.
yet today with no code changes im getting
iMultimix 8 USB with iPodŽ Dock ( Alesis iMultimix 8 )
Blue 320-Disc CD Storage Wallet ( 320CD Wallet Blue )
500-CD/DVD Storage Case ( Alu 510 CD/DVD Case )
and no expected results in the first 10??
which seems to be very strange, is it because the merchants are updating their feeds???
anyone else noticing this?
it seems no matter what keywords i use i cant get the results i want :(
i've changed the below
$aw_id = "245";
$aw_name = "CDs";
and all im getting is us imports? wtf! somethings gotta be wrong
any ideas
thanks
Luke
I am making several calls to the api which were fine up until today, for some reason they've messed up.
e.g when looking for cds using the following
$aw_id = "241";
$aw_name = "Music";
$keywords = "cd -christmas";
#GET TOP 5 ITEMS FOR EACH CATEGORY
$AW_catid = $aw_id;
$AW_cat = $aw_name;
$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = $AW_catid;
$oRefineByDefinition -> sName = $AW_cat;
$oRefineBy -> oRefineByDefinition = $oRefineByDefinition;
$returnedcolumns = array(iCategoryId, sBrand, sModel, iMerchantId, sAwImageUrl, fStorePrice, sAwThumbUrl, sName,sAwImageUrl,sMerchantImageUrl,sMerchantThumb Url,sDescription,sBrand);
$booleansearch = array('sQuery'=> $keywords, 'oActiveRefineByGroup' => $oRefineBy, 'iAdult' => 1, 'iLimit'=>10, 'sColumnToReturn' => $returnedcolumns, 'sMode' => 'boolean');
$oResponse= $oClient->call('getProductList', $booleansearch);
#print_r($oResponse);
$count = 0;
foreach($oResponse->oProduct as $oProduct)
{
$prodName = $oProduct->sName;
$img = htmlspecialchars($oProduct->sMerchantImageUrl);
$img2 = htmlspecialchars($oProduct->sAwThumbUrl);
$price = $oProduct->fPrice;
$link = htmlspecialchars($oProduct->sAwDeepLink);
$store = $oProduct->iMerchantId;
$catid = $oProduct->iCategoryId;
$desc = $oProduct->sDescription;
$merchantid = $oProduct->iMerchantId;//the id i am trying to get the store name for
$model = $oProduct->sModel;
$brand = $oProduct->sBrand;
$short_title = $prodName;
print $short_title;
}
yesterday i was recieving good results such as lady gaga -the fame, jls -jls etc.
yet today with no code changes im getting
iMultimix 8 USB with iPodŽ Dock ( Alesis iMultimix 8 )
Blue 320-Disc CD Storage Wallet ( 320CD Wallet Blue )
500-CD/DVD Storage Case ( Alu 510 CD/DVD Case )
and no expected results in the first 10??
which seems to be very strange, is it because the merchants are updating their feeds???
anyone else noticing this?
it seems no matter what keywords i use i cant get the results i want :(
i've changed the below
$aw_id = "245";
$aw_name = "CDs";
and all im getting is us imports? wtf! somethings gotta be wrong
any ideas
thanks
Luke