Hello,

Is this module currently working with taxonomy fields? The attribute contains no options when it's added to a new node of the product class I have chosen for it to appear. No errors occur.

As there have been no replies to any of the issues raised for i'm guessing this is not maintained. Shame. Useful feature.

thanks.

Comments

deepak_kadam’s picture

Any update on this?

miiimooo’s picture

I haven't tested this with taxonomy fields. Looking at the code here is the bit that may be interesting:

      $value = field_view_value('node', $node, $field_name, $item);
      $value = strip_tags($value['#markup']);

So if the field formatter returns a usable value in #markup it should work.

Otherwise if you can provide a fully feature flexed feature I can have a look.

strawman’s picture

Any word on this? Quite curious as I'm in a similar situation. Would love to use the taxonomy to filter content as well as making it the attributes to choose from. Seems like a simple enough thought but finding it very difficult to find a module that does it. this so far seems the closest I can get.

Buytra’s picture

Same as asking.
Can not use taxonomy as attributes filed,that was a important requirments.

kratkar’s picture

Replace $value = strip_tags($value['#markup']); in uc_field_attribute.inc by:

$key = isset($item['tid']) ? '#title' :'#markup';
$value = strip_tags($value[$key]);

For user reference or node reference you need to use "#markup". I tested.

yurg’s picture

Not sure if one-line replacement worth a patch to be added; besides the module seems to be abandoned a bit. Anyway, if one needs to get any node field (in my case it has been field collection, should also work with node/entity reference field) as product attribute, this replacement might be useful:

line 24 of uc_field_attribute.admin.inc
$instances = field_info_instances('node', $class->pcid);
to
$instances = field_info_instances('node', 'product');

In my case all fields of Product content type become available as Field Attributes.