Right now only Order, Product, and Line item entities are defining property metadata via hook_entity_property_info(). This code is placed in the modules' .info.inc files. As far as I can see, there is missing data for these, so we should do a full audit to make sure every property is being defined.
Additionally, Customer profile and Payment transaction entities don't have any support at all! We should go ahead and get .info.inc files for these modules with the data defined. Copy / paste definitions from other modules where applicable so we can be sure the naming / descriptions are uniform between the modules.
Comments
Comment #1
das-peter commentedHi Ryan,
As already told you on IRC, I spent some time to work on the current implementation of entity_metadata. Especially in perspective of token / rule usage.
The attached patch contains the results of my work so far.
hook_entity_property_info():Added metadata - but I'm sure there are still some missing in action. ;)
Field name handling should be (more) consistent now. I took the node module as an example how to handle it.
One big part of this was to make sure there are no underscores in the url's. I've fixed the url's for adding/editing product- and customer-types.
One special thing is that field editing url's still contain underscores (e.g.
/admin/commerce/products/types/wearable-product/fields/field_wearable_size).Since not even in the node module the underscores of the fieldnames are replaced by dashes I categorize this as highly cosmetic and thus as "to be done later" ;)
BTW: The second patch attached cleans some tab indents I've found in the code - but I'm not sure if it's not only related to my environment.
Comment #2
rszrama commentedGot these both in with accommodations for patches to change base_price to purchase_price and move code from the Product module to Product UI.