Really I have 2 issues with the Option Image module, the first is that when I try to upload an image to a particular option the upload occurs, but when the options page re-loads no image is displayed next to the option.

My second issue is that with the current site I am putting together, all of the products could just re-use the same option images instead of having to upload a new images each time I create a product. When I look into the option-images folder I want to run away like a scared little girl because the same option image has been uploaded again and again, could this be a cause of my first issue?

There really should be a better way to do this. Whether it's a default option image set in the store admin side with an over-ride happening on the product creation page, or something else that works...

Comments

SethM’s picture

Category: support » bug

Strange, when I go to the option images folder at sites/default/files/option-images and delete a couple of the images I can then re-upload images and they appear on the node page.

SethM’s picture

Also noticed this. I go to upload an image, and sometimes the image I upload doesn't appear... instead an image that doesn't exist on the server anymore appears, that is unless option-image module doesn't pull images from the files/option-images folder.........

tjholowaychuk’s picture

This is what contributing is for :P if it does not do what you want, fix it

jesperholm’s picture

I'm still having problems with this. I upload the pic, but the link is getting saved incorrectly, missing out 'mysitename' in the url link. Don't know what I've done wrong, but the default image works, and as soon as I change to another option, I get the question mark.

Help, anyone?

mtpultz’s picture

Hey Jesperholm, did you ever find a solution to this. I'm having the same issues?

jesperholm’s picture

No, heres the thing. I have got all my products' option images working with the exception of 3. These 3 are in no way different to the other products (I have even tried to clone one of the existing nodes and only editing the names) but whenever I try to cycle through the option it comes up with 'modules/uc_option_image/images/noimage.png' as the image when I try to open it in a new page. I feel like I've tried everything, from creating a new product and calling something simpler than the original, but no luck!
The funny thing is that the default image does show up, and is correct, but as soon as I try to choose something different(or even the same option) back to the evil blue question mark!

What the hell!??

SethM’s picture

Have you tried going into files/tmp and deleting any images that appear there? In the past I had images get hung up in that folder, and when I delete them imagecache decides it wants to rebuild the missing images.

SchwebDesign’s picture

Any news on this? I have the same problem as jesperholm above.

khizerjalal’s picture

Hey!!! no solution?? anyone? I am having same kind of problem????.

charlie-s’s picture

In the current dev release there is a typo in the function theme_uc_option_image() on line 591. This function uses the variable $filepath which it never defines / doesn't exist.

You would change the references from $filepath to $file->filepath and things should work – here's the new code:

<?php
      $imagecache_image = theme('imagecache', $size, $file->filepath, NULL, NULL, $attributes);
    }
    else {
      $imagecache_image =  theme('image', $file->filepath, NULL, NULL, $attributes, FALSE);
?>

Patch attached.