function commerce_option_entity_property_info_alter in Commerce Product Option 7.2
Implements hook_entity_property_info_alter().
Define extra properties for commerce line items where we'll load in their commerce options. We do this so we can use this property for comparison in commerce_cart_product_add().
File
- ./
commerce_option.module, line 193
Code
function commerce_option_entity_property_info_alter(&$info) {
foreach (commerce_option_set_load_multiple(FALSE) as $option_set) {
$info['commerce_line_item']['properties'][$option_set->set_id] = array(
'label' => $option_set->name,
'type' => 'text',
'description' => t('A serialized array of all the fields defined in this option.'),
);
}
}