I have spent so much time trying to figure out if there is a way to change and personalize (and even filter) the content list shown in the select of the product reference widget, or anyway in that field.
In the select options, products are listed just in the form of SKU - Title, that might be good or not enough ...
I tried all the now available contributed modules, like Commerce Product Reference View Widget and VT Commerce Product Reference Widget, etc, and even this last ... entityreference_view_widget.
But no luck, any satisfaction ... no good result.
Which is (would be) the proper way to change/extend/personalize the format the product info are shown in the select reference widget?
I am really missing on product_reference what references (node & user ...) is able to do with views? I mean to re-use a reference view inside the select options ...
How to get the same in product reference?
Tnx for any help ... !
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Product_Reference_back_end.jpg | 47.29 KB | itamair |
| #3 | Node_reference_field_settings.jpg | 57.87 KB | itamair |
Comments
Comment #1
itamair commentedAny help on this?
Comment #2
liupascal commentedHave you tried this http://drupal.org/sandbox/liupascal/1357524 ?
I used a hook_form_alter on the add_to_cart form where commerce wraps up the UI on the product attributes to alter it and display it differently.
I'm not sure what you are trying to do exactly
Comment #3
itamair commentedThank you liupascal for the answer.
Probably I wasn't clear, or probably I should use the hook_form_alter on the add_to_cart form as you said.
But actually I really would like to have something to alter the format in which the products are listed in the product reference widget, that sticks you to the fixed format [sku] : [title], as shown in the "Product_Reference_back_end.jpg" attached file ...
With references module (http://drupal.org/project/references), the node/user reference widget field input might be changed and personalized with a "References" display type view, as shown in "Node_reference_field_settings.jpg" attached file ... and this is very useful.
I was worrying if something very similar might be implemented in Drupal Commerce, and in its Product_reference specific module.
I am assessing the codes of the two modules (reference->node_reference vs commerce->product_reference) and finding some good similarities ...
but so far didn't arrive to a working solutions.
The availables modules (Commerce Product Reference View Widget and VT Commerce Product Reference Widget) mentioned in my first post, that try to do all this, aren't so effective like the references module is on node and users entities ... and they don't work for me at all.
I hope I was more clear this time ...
Comment #4
itamair commentedOk. I did it!
I succeeding in integrating Drupal Commerce (last dev version) with References View Display, from the References module.
It works for me, and seems to work well.
Just follow this post to get how: http://drupal.org/node/1436174
Comment #5
rszrama commentedComment #5.0
rszrama commentedbetter format