Amazon->setAccessKey( Configure::read('App.APIs.AmazonKey') ); $this->Amazon->setAssociateTag( Configure::read('App.APIs.AmazonTag') ); } function index() { $items = $this->Amazon->itemSearch('DVD', 'Title', 'Small,Offers'); if (!$items) { pr ($this->Amazon->getLastErrors()); // pop some errors } else { $this->set('items', $items); } } function view($asin) { $item = $this->Amazon->itemLookup( $asin ); if (!$item) { pr ($this->Amazon->getLastErrors()); // pop some errors } else { $this->set('item', $item); } } ?>