Closed (fixed)
Project:
Amazon Store
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2012 at 00:12 UTC
Updated:
4 Oct 2012 at 05:11 UTC
I would like to add a small item thumbnail to the "similar items list" generated by the item details page.
Since this list creates a link using the "title" and the "ASIN" for each item. My question is; is it posible to add an item thumbnail link as well?
I know that with the "Amazon Filter" module this can be one from the editor area using the [amazon ASIN smallimage] format as an example.
Since the "similar items list" is a for-loop printing ASIN's and Titles, I was wondering if there a way to invoque the filter from within the template to append the image thumbnails with links to that list.
Any suggestions are most welcome.
Thanks,
Sandro.
Comments
Comment #1
TamboWeb commentedComment #2
TamboWeb commentedNever mind, I figured it out over the weekend.
Comment #3
rfayIt's always nice to the next person with this question for you to explain how you "figured it out". They'll find this issue with a search... and then wonder what happened. Could you please explain what you did?
Comment #4
TamboWeb commentedYou are right rfay.... Here is what I did to get the similar items thumbnails. The following is by no means the most elegant or efficient way to do this but it helped me understand the amazon module(s) so that I can create a helper module for my application.
My setup>
Drupal 6
Moudules: Amazon Module, Amazon Filter, Amazon Import, Amazon Store ( all enabled )
Copied the amazon_store_similar_items_panel.tpl.php from the amazon_store module directory to mytheme directory.
Changed the code that generates the list of similar items in the amazon_store_similar_items_panel.tpl.php template file
Look for this code:
Now here is what change:
For the above to work, the amazon filter must be enabled and set for the apropriate input format.
Potential issues:
Every time we pass the $sim_image_url string through the check_markup() function, we do a db or web lookup and add amazon items to the database. ( your database will grow very quickly )
Other comments:
Although this may work, it does not seem to be the best implementation. A separate custom module with additional functionality to filter and narrow down the similar items may be a better implementation.
Hope this helps :)