Helps to administer Drupal Commerce 2.x product attributes. You may need it if the set up on your Drupal Commerce site requires creation of a great number of attributes. Also, the Commerce Correct Attributes ↗ submodule can be used to add combined attributes feature and fix some attribute related issues.
Tip: you can see this file in your browser by clicking the admin/help# link at the right of the Admin toolbar and then the admin/help/commerce_xattributes# link in the list.
The module was created as a solution for the following Drupal Commerce issues:
- Issue #2842961: Add a customer-facing label to ProductAttribute ↗
- Issue #2912910: Product attribute list page should display machine names ↗
- admin/help/commerce_xattributes#setup
- admin/help/commerce_xattributes#todo
- admin/help/commerce_xattributes#module-author
- Commerce Extended Attributes on drupal.org ↗
- Commerce Extended Attributes on github.com ↗
After installing the module go to admin/commerce/product-attributes and check your existing attributes:
In the left column there are ID, name and label of an attribute. In the middle column the attribute values displayed separated by a coma. Note that a value is truncated if it exceeds 10 characters. The same with a maximum number of attributes possible to display which is one hundred. The hint (N more values…) is displayed if this number is exceeded. In the right column there are operations for an attribute. Note that attributes sorted by ID using PHP SORT_NATURAL ↗ flag. So, if some attributes are required to keep always at the top of a list then the ID should start with a number: 0_my_attribute, 1_my_attribute, a_my_attribute, b_my_attribute, etc..
If a customer facing Label is not set then the attribute name is used for this purpose when adding it to a variation type. Could be overridden later on the variation type attribute's edit form. The Label also might be used as a helper to distinguish attributes in the select element ↗ on an Add to cart form.
When adding attributes to a variation type there is an attribute ID at the right linked to the attribute edit page. After saving an attribute on a variation type admin name turned into customer facing label at the left linked to the variation type attribute field edit page. All saved attributes are forcibly placed at the top of attributes list. Note that in the example below default labels for attributes are overridden.
- Allow attribute values to set price adjustments (percentage, amount, etc..).
Vlad Proshin (drugan)
[[email protected]]([email protected])
[https://drupal.org/u/drugan](https://drupal.org/u/drugan)