function commerce_product_configure_product_type in Commerce Core 7
Ensures a base price field is present on a product type bundle.
3 calls to commerce_product_configure_product_type()
- commerce_product_configure_product_fields in modules/
product/ commerce_product.module - Configures the fields on product types provided by other modules.
- commerce_product_configure_product_types in modules/
product/ commerce_product.module - Configure the product types defined by enabled modules.
- commerce_product_ui_product_type_save in modules/
product/ commerce_product_ui.module - Saves a product type.
File
- modules/
product/ commerce_product.module, line 335 - Defines the core Commerce product entity, including the entity itself, the bundle definitions (product types), and various API functions to manage products and interact with them through forms and autocompletes.
Code
function commerce_product_configure_product_type($type) {
commerce_price_create_instance('commerce_price', 'commerce_product', $type, t('Price'), 0, 'calculated_sell_price');
}