First of all, a big thanks for this module. It was a key ingredient in helping me try to convert an existing site to Drupal.
I'm still a rank beginner, but I was hoping you might point me in the right direction. I've got about 500 CCK nodes, each with between 3 and 7 related ASINS. Everything works great, and the related books appear at the top of the page in an unthemed output.
I would like to theme a related books block in the right sidebar. Is the "correct" way to do this:
1. Figure out how to extract and theme the fields from the Amazon Object from within my page Content -(if thats the correct terminology)
2. Use views to create a view of all the books, and them filter them down by writing a query within the args field of the view that would include only those ASINs that match the current NID in the amazonnode table.
3. Consider Amazon Filter or some other approach.
Sorry if this is basic stuff, but I'd like to learn the right way to do this so I don't have to do it again.
Thanks if you can help!
Comments
Comment #1
Prometheus6 commentedWarning: I have not used CCK at all. the asin field is Jeff Eaton's work.
That said, I got an email from the Drupal Developer list that may help you.
Once you get the ASINs you can use _amazon_product_db_data_by_ASIN() to get the actual data on each book. The function will accept a comma delimited string of ASINS or an array of ASINS.
Comment #2
herb commentedThank you for the response.. It will certainly give me a bit to digest. However, I may have confused the question as I'm not using the asin field, and I don't think that CCK use is an issue here.
Maybe more directly... If I have a normal page, into which I've added 3 comma delimited "Related product(s)" asins, is there a simple way to get just these 3 related books output into a block? With or without Views?
Thanks again
Comment #3
Prometheus6 commentedOh, sorry. The fact that they are CCK nodes threw me.
The bit about using _amazon_product_db_data_by_ASIN() still applies.
Comment #4
Prometheus6 commentedComment #5
herb commentedOK - Thanks much. I think I've gotten something to work that presents the related book links in a block. I'm strictly an amateur, and 2 months ago could hardly spell PHP, but in case anyone else could use this, or there are any gross deficiencies this is what I used. (It's mostly derived from the amazon.module)
PS - The links upon hovering show my Amazon ID, but when clicked the link visible on Amazon no longer shows my Amazon ID, and does show a SubscriptionId=1XFK01HK9NZWGPEN????. Is this the expected behavior? Thanks again!
Comment #6
(not verified) commented