Zend_Service_Amazon did not have an option to configure your AssociateTag, which is your identifier from Amazon's Associate Web Services.
So I added that to the Zend Service, now all returned links contain your tag.
To use it, just call the constructor with your AssociateTag:
$amazon = new Zend_Service_Amazon_Query($awsId, $countryCode, $associateTag);
Here are the changes to Amazon.php:
class Amazon {...
public $associateTag;
public function __construct($appId, $countryCode = 'US', $associateTag = '')
{
...
$this->associateTag = (string) $associateTag;
...
}
public function itemSearch(array $options)
{
$defaultOptions = array('ResponseGroup' => 'Small', 'AssociateTag' => $this->associateTag);
...}
public function itemLookup($asin, array $options = array())
{
$defaultOptions = array('IdType' => 'ASIN', 'ResponseGroup' => 'Small', 'AssociateTag' => $this->associateTag);
... }That's it! Easy, right?Suggestions are welcome!
Tell me if it works for you and what you use it for. :)