I've several product reference fields, but now way to distinguish them in the Views UI (besides checking the HTML).
Would be nice to see a list with the entities using the field and which product types can be referenced with it.
Attached patch adds these information to the help text.
Since I don't know why hook_field_views_data_alter() instead hook_field_views_data() is used I created two patches. One stays with hook_field_views_data_alter(), the other switches to hook_field_views_data().
| Comment | File | Size | Author |
|---|---|---|---|
| commerce_product-reference-ux-views-intergration--alter.patch | 1.96 KB | das-peter | |
| commerce_product-reference-ux-views-intergration.patch | 2.7 KB | das-peter |
Comments
Comment #1
pcambraPull request done:
https://github.com/pcambra/drupalcommerce/commit/0ee6034bd2588b9b7393b63...
Comment #2
rszrama commentedw00t! Committed with a minor change - we don't want to split out part of the help text into a separate t() string, because it will be harder for translators (especially for languages with different word order). Instead I calculate the help message where you were currently checking if the $referenceable_types array was empty.
Comment #3
rfayGet these errors today after this commit; das-peter says probably due to this patch.
When visiting admin/commerce/products, I see:
Comment #4
pcambraCan I have more details on this? I don't see how to reproduce it.
Comment #5
rszrama commentedJust figured it out. We had committed a patch earlier this week to provide more information in the description of product reference based relationships, but then we later committed a patch that moved referenceable types for product reference fields to instance settings instead of field settings. I had to revert a little of the information from the first patch to accommodate the change. Tested / committed.