diff --git a/commerce_price_table_ief/commerce_price_table_ief.module b/commerce_price_table_ief/commerce_price_table_ief.module index f223dba..cb66d2c 100644 --- a/commerce_price_table_ief/commerce_price_table_ief.module +++ b/commerce_price_table_ief/commerce_price_table_ief.module @@ -62,5 +62,10 @@ function commerce_price_table_ief_field_formatter_view($entity_type, $entity, $f */ function commerce_price_table_ief_inline_entity_form_entity_form_alter(&$entity_form, $form_state) { commerce_price_table_form_commerce_product_ui_product_form_alter($entity_form, $form_state, 'commerce_product_ui_product_form'); + if (isset($entity_form['commerce_price']['#access']) && !$entity_form['commerce_price']['#access']) { + if (!isset($entity_form['commerce_price'][LANGUAGE_NONE][0]['amount']['#default_value'])) { + $entity_form['commerce_price'][LANGUAGE_NONE][0]['amount']['#default_value'] = '0.00'; + } + } }