Posted by ccshannon on November 21, 2008 at 5:36pm
Jump to:
| Project: | Ubercart Option Images |
| Version: | 6.x-1.4 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi,
I followed the screencast and tried over and over, switching from bluemarine to garland, but the images simply will not display in list view, product view, or any view except when editing the options for the product in the options edit screen.
On product views, instead of an option_image, I have the words "No Image". I can see my two image options (product color images, one called "black" and the other called "white") in the source HTML but they are hidden.
I'm using Drupal 5.12 and Ubercart 1.5.
I set option images in the admin preferences to be viewable by everyone, but it makes no difference. The "No Image" message is there no matter what I do.
Any ideas?
Thanks.
Comments
#1
#2
More info ...
the best I could get was "No Image" message and switching the select box for "color" only created the fade effect switching from "No Image" to "No Image" again.
I got frustrated to the point that I created a a whole new attributes/options set, a new test product from scratch and added in the new color options and images all over again.
This time I got the "default" image, but when I use the selector to switch images, there is a quick "fade" effect, then the product image disappears entirely, no message. Then, no matter what I try switching to, I get no image at all.
Again, any ideas as to why I cannot get this to work would be greatly appreciated. Thanks.
#3
For some reason, I'm no longer seeing the "No Image" message when testing.
But the "switch images" feature, I cannot get working.
I have an item in two colors: "black" and "white".
I can make the "white" item show up in the product node, as the default image, but using the select box to select "black", dos nothing to the image.
I can switch the default image to "black", and indeed when I view the product node, the "black" item is displayed as the default image, but switching to "white" does nothing.
I understand the module is seeking a maintainer, so that would indicate the problem probably has no solution. Without the "switching" ability working, I'm not sure what to do.
The purpose of the module is to tie a product attribute option ("blue", "red", "white") to a matching product image, so that when one "selects" the option in the product node, the product image switches to the one matching the option.
I have tried turning it off and on, with thickbox and without, with one attribute enabled and with two, with no product images (imagefield) and with several. I did the screencast step-by-step. It just doesn't work for me.
Any ideas would be appreciated. Thanks.
#4
I had the same problem, and it seems that the javascript is placing the image location address without the "/" in the beginning. This is the only reason mine isnt working.
ie. src="sites/default/files/option-images/Red_Dog.jpg" instead of src="/sites/default/files/option-images/Red_Dog.jpg"
#5
okay I dont understand any of this bug fixing and stuff, I also don't understand Javascript but I managed to fix this particular problem:
Line 56-71 of the uc_option_image.js file :
/**
* Switch the imagepath based on the selected effect.
*/
UCOI.switchImageEffect = function(image, imagepath) {
var slashimagepath = '/' + imagepath;
switch(this.effect){
case 'fade':
$(image).fadeOut(200, function(){
$(this).attr('src', slashimagepath).fadeIn(200);
});
break;
default:
$(image).attr('src', slashimagepath);
}
};
(I added the line: "var slashimagepath = '/' + imagepath;" and then changed the next 2 occurances of "imagepath" to "slashimagepath") now it works perfectly!!
#6
Ah, good one! I actually ended up writing a module to have swatch images that don't override the product images - which needs a lot of polishing given it's the first module I've ever written.
I wonder if that .js slash will be a problem with the D6 port, which is being worked on:
http://drupal.org/node/294725
#7
I've been using that D6 version (I think it was under post #12) with the mentioned .js edit and it seems to work okay - sortoff - it just happens to 'forget' the option images every once in awhile but apart from that its perfect :/
Also if you want to add a product image that doesn't get affected by the dropdown then just wrap it in a div with a different class/id to whatever the option-image is ( you can do this with http://drupal.org/project/contemplate )
#8
Drupal 6.16 and Ubercart 2.2
Like a lot of people it seems, I wrestled with UC Radio Images vs. UC Option Images for a long time. Both modules were sort of working but giving me lots of headaches. I could get neither of them to display the actual image in the product view.
While it's still not perfect, I found out that the majority of my problems stemmed from incompatibilities with the Ajax Attribute Calculations module. Once I disabled it, the other started working more or less as intended, and even to my amazement, side-by-side.
I guess you can't have everything, if like me, you're still to drupal-ignorant to figure out how to make them all work together. I still prefer it this way, I'd much rather the attribute options show up during the product config process and then show the price on the next page.
I hope this helps someone somewhere... and if anyone has suggestions for me, I'm more than open to learn.
thanks!
#9
As an update, I eventually was able to get Ajax Attribute Calculations and Option Images to play together by using attachBehaviors(), but have yet to solve Radio Images because it has no javascript, and therefore cannot be hooked into attachBehaviors().
I will try and post the code for my solution soon, if anyone is interested.
#10
See #712542: Compatibility with Ubercart Ajax Attribute Calculations module for a solution to get UCOI to work with uc_aac.