Closed (won't fix)
Project:
Ubercart Option Images
Version:
5.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2008 at 21:49 UTC
Updated:
5 Dec 2010 at 05:36 UTC
Jump to comment: Most recent file
Comments
Comment #1
tjholowaychuk commentedHello, I cant confirm at this moment but uc_option_image does require some of the same markup generated by a 'default' Drupal install, such as
Comment #2
tjholowaychuk commentedI just did a quick test using the code below and it seem to be working. I would assume this is an issue with the JavaScript markup dependencies ( I will be documenting this as this seems to be a common problem )
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
rvarkonyi commentedHi!
I really like your module, it works great!
I'm in a theming problem too, I get the same problems but only when I place
<?php print $node->content['option_image']['#value'] ?>in a<div>. If it's not in a<div>the images switch ok. Is there any chance it could work in a<div>?Thanks!
Rob
Comment #5
brotkel commentedI've found that the function that switches the image is very hierarchy dependent. It requires that the input and the image are in the same container in the DOM and that the container has the class "content", which works fine if you're just using the raw content, but not if you theme the page so that the add_to_cart section isn't in the same place as the image, or if you're not adding the content class as the parent of both items.
To fix this, I just removed the hierarchy. In uc_option_images.js, find this on line 37:
var image = $(input).parents('.content').children('img.uc-option-image');and change it to this:
var image = $('img.uc-option-image');.
I haven't extensively tested this with multiple options, so I don't know if it will cause issues for other people, but it works fine for my store.
Comment #6
Militopedia commentedHi brotkel,
Thanks for the solution. I am using Drupal 6 and tried to solve the same problem. In Firefox it worked without a fix, but it didn't work with IE. I don't understand js but here's what I changed in uc_option_image.js:
I replaced
image = $(':not(.uc-option-image-preloaded) > div.uc-option-image-block').children('img.uc-option-image');with
image = $(':not(.uc-option-image-preloaded) > div.uc-option-image-block')>('img.uc-option-image');It worked now in IE, HOWEVER, the fade effect doesn't work anymore.
Do you know why and how I could correct this so that the fade effect still works?
Thanks!
Roger
Comment #7
cangeceiro commentedAttached is the fix in #5 in patch form. It would be great to have this committed to the source tree. Is there any reason that it needs to be hierarchical? This creates lots of problems when it comes to theming.
Comment #8
jazzitup commentedMarking as "needs review".
Comment #9
acouch commentedThe 5.x version is no longer being supported for this module. We are cleaning up the 6.x version and preparing for the 7.x version.