Hi,
It’s not something that the plugin supports in a ‘user friendly’ way, but I could probably give you a snippet of php code to do what you want. I’ll try and post something tomorrow,
Cheers,
Paul
This is the least ‘back door’ish way I can think of to do a search:
if (isset($awlfw)) {
$opts['s_title'] = $book_title;
$opts['s_index'] = 'Books';
$opts['s_page'] = 1;
$items = $awlfw->search->do_search($opts);
if (isset($items['Error'])) {
echo '<div class="Error">Search Failed: ' . (isset($items['Error']['Message']) ? $items['Error']['Message'] : 'No Error Message') . '</div>';
} else if (is_array($items) && (count($items) >0)) {
$asin = $items[0]['asin'];
echo amazon_shortcode("asin=$asin&template=wishlist&live=1");
} else {
echo "<PRE>";print_r($items); echo "</PRE>";
}
}
Works for me, at least,
Good luck,
Paul
Thread Starter
guel
(@guel)
Hi Paul.
It works. It helped a lot. Thank you for your assistance.
Thread Starter
guel
(@guel)
I have another question. What is the keyword to place between %% to display “used price and new price starting from” other than amazon’s price? Are these keywords listed somewhere?
Where can I find a list of keywords for the associative array field? For example, how do I add a query for ISBN 10?
Hi,
The keywords the plugin currently supports are listed in the ‘Template Help’ window on the plugin’s Options page.
You can add your own keywords by creating your own ‘extras’ plugin or adding some code to your themes files, here is a plugin I knocked up to add the ISBN, NEW_PRICE & USED_PRICE keywords:
amazon-link-my-keywords.php
Download it, remove the ‘_.txt’ extension, upload to your plugins directory and activate it.
If you have a play around with the Amazon Advertising Scratchpad you can see exactly what data is available and where in the response data structure it might be found:
http://associates-amazon.s3.amazonaws.com/scratchpad/index.html
Paul