Updated V3 – To get a list of merchants in a particular category
Updated to V3 – To retrieve a list of merchants in a perticular category, the code is as follows:
In the head of the document:
1 2 3 4 5 6 | <?php require_once('constants.inc.php'); require_once('classes/class.ClientFactory.php'); $oClient = ClientFactory::getClient(); $merchantcolumns = array(sLogoUrl,sClickThroughUrl,sDisplayUrl,sDescription,sStrapline); ?> |
In the body:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <?php $listmerchants = array('iCategoryId'=> 97, 'iMaxResult' => 10, "sColumnToReturn" => $merchantcolumns); $oResponse= $oClient->call('getMerchantList', $listmerchants); foreach($oResponse->oMerchant as $details){ $name = $details->sName; $strapline = $details->sStrapline; $description = $details->sDescription; $logo = $details->sLogoUrl; $showurl = $details->sDisplayUrl; $deeplink = $details->sClickThroughUrl; $id = $details->iId; if ($logo<>'') { echo "<a href=".$deeplink." title='".$name. " :: ".$strapline." :: ".$showurl. "'><img src=".$logo. " style='float:left; margin:5px;' alt='".$name. " :: ".$strapline." :: ".$showurl. "' width=\"88\" height=\"31\" border=\"0\"></a>"; } } ?> |
Obviously if you want to show more merchants, then change ‘iMaxResult’ => 10 to whatever number you want.
Please refer to this page for the breakdown, it’s essentially the same




