This does help, but I'm still having a problem with this service. Specifically, my foreach loop produces ten results, but I can't seem to get anything to actually show up. I.e., my tags are all empty.
Here's what I've got so far:
Code:
class Amazon
{
function getAmazon($keywords)
{
$amazon = new Zend_Service_Amazon_Query('APIKEYGOESHERE','US');
$amazon->category('Books')
->Keywords($keywords)
->ResponseGroup('Small,Images');
$results = $amazon->search();
if ($results->totalResults() > 0)
{
return $results;
}
else
{
return NULL;
}
}
}
Code:
$amazon = new Amazon;
$aresults = $amazon->getAmazon($tag1);
$this->view->amazon = $aresults;
Code:
<?php foreach($this->amazon as $key => $amazon) : ?>
<div><a href = "<?php $amazon->DetailPageURL; ?>"><img src = "<?php $amazon->SmallImage->Url; ?>" /></a></div>
<?php endforeach; ?>
Any guidance would be appreciated.
Edit: I'm an idiot. I just forgot the friggin' echo. I must have stared at this for an hour without seeing that.