PDA

View Full Version : is it possible to get only the web only offers from an array of merchants?


ljackson09
06-01-10, 20:30
Hi All, Happy new year to you all!!!

i am trying to get all the web only products from an array of merchants but i cant seem to figure it out :(

here is my current code
$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);
$merchantcolumns = array(sDescription,sSpecification,sPromotion,sBran d,sModel,iMerchantId,fPrice,fRrpPrice,iId,sAwImage Url,sMerchantImageUrl,sMerchantThumbUrl,iCategoryI d,bWebOffer);
$aParams = array("iMerchantId" => $storeID, "sColumnToReturn" => $merchantcolumns, "iAdult" => 1);
$oResponse= $oClient->call('getProductList', $aParams);

$weboffer = array();
$x = 0;
foreach($oResponse->oProduct as $oProduct)
{
if($oResponse->bWebOffer)
{
$weboffer['name'][$i] = $oResponse->sName;
$x++;
}

};

print_r($weboffer);


if someone would kindly point me in the correct direction thank would be swell :)

cheers
Luke

ljackson09
07-01-10, 14:33
think ive posted this in the wrong section :( should be in the API section sorry!!