By CosmicVoyager on
I'm trying to use Amazon.com's Product Previews and Context Links on my 5.1 site. Both require a piece of Javascript in page.tpl.php. I got the Context Links working by disabling the JSTools and devel modules, but cannot get the Product Previews working. It works fine on my 4.7 site, and I've verified that the Javascript is identical. Has anyone gotten it to work, or has any clues?
Comments
Trying to do the same here...
...though I don't know enough about Drupal to start tinkering without knowing what I'm doing.
Any suggestions?
From my research this
From my research this appears to be a javascript conflict between Amazon and Drupal. Since it worked fine with Drupal 4.7, I suspect it has to do with JQuery. I'm not willing to go poking around with that, so no Amazon product previews for now. Strangely enough, Amazon context links work fine, even though it seems to use pretty much the same javascript.
There hasn't been much discussion in the Drupal forums about this, so I'm guessing that most Drupal users don't use Amazon previews, or hasn't upgraded to Drupal 5.
I had this working...
I'm in the same situation and had it working. Now, it's not and I'm seeing jquery.js javascript console messages. Don't know whether these were appearing before or not. I'm not sure why it's stopped working.
Maybe Amazon have changed something at their end since we end up downloading the JScript from them...?
The only new modules installed are, Search and Paging.
Did you get it to work?
Hi there,
I'm trying to get Product Previews to work, too, and found this post.
When checking http://cabeki.openleftbox.com/node?page=2 (Kurt Vonnegut: 1922–2007), I saw that you had an overlay with details. Which functionality are you using? It looks very much like Product Previews working. Or is that achieved through Context Links? If it's Product Previews, how did you manage to get it working?
Also, I tried using the Amazon Context Links, but that didn't seem to work for me, either. Maybe you could help me out? It might give some insights if you could list all modules you've got activated - or which specifically you know cause conflicts.
Your help would be much appreciated,
-- Sara
It's definitely jquery, but I don't understand why
I have the same problem using the Amazon "link enhancer", and I have now verified that it is definitely due to jQuery.
The error message is:
'this.events' is null or not an object
I took a copy of the page, and chopped out the included files one at a time. Taking out the jQuery.js script makes the problem go away.
Sadly, jQuery.js looks like it's been through an obfuscator, so I have no idea what it's doing and can't debug this further. Any jQuery experts out there who can help?
xgretsch
Good to see there's still
Good to see there's still some interest in this topic... I had pretty much given up on ever having Product Previews on my site. What I don't get is why Amazon Context Links work fine with pretty much the same Javascript. (And when I say "works fine", it's strictly in the technical sense... the links I get are laughably useless.)
Here's hoping for some magical insight!
jQuery Update
xgretsch:
Try installing http://drupal.org/project/jquery_update
You'll then have an uncompressed version of jquery in your drupal installation, and will be able to further investigate what causes conflicts.
Having said this, I played around with it a bit, and didn't have much success. Maybe you're luckier, though.
-- Sara
Edit: Sorry for not replying to the correct comment. I pressed reply, and then logged in - and something seems to have gone wrong there.
It seems to be related to the comments form
Hi, I've been able to track this problem to the comments textarea. If you disable the comments area for your node you'll see the Amazon preview links working fine and the jQuery error won't appear anymore.
This made me think the problem could be related to the resizable textarea or collapsing of the input format fieldset (if you have permissions to see it) so I disabled both of them with some template.php and hook_form_alter changes but I couldn't get rid of the problem.
I even unset all form fields of the comment form and I still had the jQuery error message on Firebug. What else do enabling comment on a node add? I'm stuck here but maybe this can help any of you to find the final solution :)
Cheers.
Alexis Bellido
Ventanazul: web development and Internet business consulting shouldn't be boring