Hey guys,

when I have required attribute, uc option image doesn't work correct.

Can you look on it?





joelstein’s picture

I can confirm the same issue. Making the attribute not-required fixes the bug, and then the images show. Is this perhaps a problem with the way Ubercart deals with required attributes?

Rar9’s picture

+1 didn´t it used to work?

storytellerjeff’s picture

Subscribing - It did used to work. I've got the same problem. As soon as I make an Attribute required - the images don't show up.

AllyMediaGroup’s picture

Confirm, I disabled required attribute and the first image shows up, but the image does not change when selecting different selection, in either radio buttons, or select field.

yannickoo’s picture

My problem is that my option (color) jumps to the first (white) but the option image isn't shown up.

I cannot understand why the module selects the first element via js.

Please let us bring the module forward :c

OriginalSauce’s picture

Is there a way around this to make this work with setting the required field?

stewart.adam’s picture

Attached patch fixes the issue with required attributes.

BullMoose’s picture

The patch is not applying for me on the dev release from July 12, 2011. What dev are you using with this patch? Thanks for the help!

error: while searching for:
function theme_uc_option_image($aid, $file, $size = '_original', $node) {
  $shownoimage = TRUE;

  if (!variable_get('uc_option_image_show_noimage', FALSE) && $file->filename == 'option_image_0_0_0') {
    $file->filepath = NULL;
    $shownoimage = FALSE;

error: patch failed: uc_option_image.module:597
error: uc_option_image.module: patch does not apply
stewart.adam’s picture

The patch was against git, 6.x dev branch.

BullMoose’s picture

The current dev version on git is what I attempted to patch as well. Has something changed since your patch was made?

stewart.adam’s picture

It doesn't look like they have made any commits lately but I was developing this patch after I had patched a few other issues so the line numbers may be off a bit. I just re-tested after a fresh checkout and it applies cleanly on git branch 6.x-1.x with fuzz enabled:

patching file uc_option_image.module
Hunk #1 succeeded at 84 (offset 2 lines).
Hunk #2 succeeded at 590 with fuzz 2 (offset -12 lines).
Hunk #3 succeeded at 609 (offset -12 lines).