PDA

View Full Version : why are my result so different from yesterday?


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

Andy
09-02-10, 14:03
I think you've fallen victim to what is commonly known in the industry as "A Merchant Cock Up" (That's technical jargon, that is)

It seems to me like some merchant/s have added products into the wrong sw category. You'll be able to see who they are. The best thing to do is get the MID and the merchant name from the products returned and post them into the Datafeed Reports section of this forum here: http://www.shopwindowforum.com/forumdisplay.php?f=15

It may also speed things up if you contacted the merchant/merchant manager via the interface on their merchant page in your affiliate account.

I dont think this is something Affwin support can help with, but those 2 things should suffice.


In the meantime, you can do 1 of 2 things:
A) make a csv list of all the merchant MIDs you do want products from and add them into your code so you will only return results from those.
B) add a searchterm that negates the merchant returning results you dont want. Searchterms in V3 allow negative operators, but AW aren't google, so it's not 100% effective.

Good luck

ljackson09
09-02-10, 18:42
hi mate thanks for your reply,

it seem that it is almost impssible to pull some things out of the api at the moment? for example im trying to pull out the top cds and i was getting well know results now im not ive never herd of some of them?

ive tried adding an array to my code of the merchant ids that i want to show but it doesnt seem to be working

i have tried this
$storeID = array(
9,15,65,157,172,282,323,380,483,547,550,686,782,85 4,896,911,980,
1052,1084,1107,1109,1132,1134,1152,1184,1186,1198, 1202,1221,1228,
1252,1256,1257,1270,1311,1322,1331,1344,1350,1402, 1404,1418,1472,
1487,1521,1559,1597,1598,1599,1672,1744,1815,1826, 1836,1916,1946,
1947,1964,1970,1971,1995,2026,2038,2041,2066,2117, 2124,2147,2203,2208,
2249,2258,2276,2344,2354,2383,2400,2424,2433,2453, 2481,2526,
2537,2547,2548,2549);


and then included this in the call
'iMerchantId' => $storeID,

but im still getting products from other merchants

any ideas
Thanks

Luke

ljackson09
09-02-10, 19:22
p.s if you are able to do a search and refine by entertainment 634 and see what are the top 3 results are for you

im getting 3 old pc games? no keywords chosen in the query

here is my code
$AW_catid = 634;
$AW_cat = "Entertainment";
$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(sName,sAwDeepLink,sAwImageUrl,sMerchantImage Url,sMerchantThumbUrl,sDescription,sBrand,iMerchan tId,iCategoryId);
$aParams = array("sQuery" => "", "sColumnToReturn" => $returnedcolumns,"bIncludeTree" => true, "oActiveRefineByGroup" => $oRefineBy,"iLimit" => 3, "sSort"=>"popularity","sMode" => "boolean");
$oResponse= $oClient->call('getProductList', $aParams);
$iTotalCount = $oResponse->iTotalCount; // get the total count before the next call


and im getting
Cars - Mater-National from gameseek
Driver and Driver 2 Compilation Pack from gameseek
Tim Burtons Nightmare Before Christmas from gameseek

which to me isnt right? there all old games and are surley not the most popular entertainment products?

can you check out the query at your end to see if you get the same results please

many thanks
Luke

Andy
09-02-10, 20:17
Hi Luke

Im not at my desk till tomorrow, so I cant get to my api files. Ill have a blast in the morning for you

ljackson09
09-02-10, 20:47
Ok thanks mate :)

Andy
10-02-10, 14:59
With that code, my ONLY 3 results were:
Guerrilla Marketing for Consultants: Breakthrough Tactics for Winning Profitable Clients
The New Health Insurance Solution: How to Get Cheaper
Captain America

It seems to me that we're getting default results as it takes longer than it should. You should get results within a second, if it takes longer, SW is trying to figure out some default to send you. I get those results even when I change things and even send empty category ids

Im not really on form lately and I cant suss this out at all so Im giving up for now. Hopefully my head will clear soon and I'll be able to help you out. Let me know if you sort it

ljackson09
10-02-10, 15:54
ok thats interesting...

will have another go tonight i some how used my total allowance of 10000 calls in around 5 hours of testing. oops :D

didnt relise that some piece of code was requesting 500 calls each time i ran it!

but will start testing again tonight at around 5pm :)


p.s im getting those results but for entertainment search with no keywords.

cheers for your help mate
appreciate it