diff -urp ../uc_node_checkout_clean/uc_node_checkout.admin.inc ./uc_node_checkout.admin.inc --- ../uc_node_checkout_clean/uc_node_checkout.admin.inc 2009-05-07 12:40:16.000000000 -0400 +++ ./uc_node_checkout.admin.inc 2009-05-07 12:40:01.000000000 -0400 @@ -63,6 +63,13 @@ function uc_node_checkout_type_form(&$fo '#default_value' => $nc_map[$type->type]['nid'], '#autocomplete_path' => 'uc_node_checkout/autocomplete', ); + + $form['product_message'] = array( + '#type' => 'textfield', + '#title' => t('Require Additional Information Message'), + '#description' => t('Because the add to cart button will function differently, a message is set explaining this to the user. You may modify the message as needed or use <none> to disable it.'), + '#default_value' => variable_get('uc_node_checkout_'. $type->type .'_message', t('This product requires some additional information.')), + ); if (module_exists('views')) { $views = array(); @@ -145,12 +152,13 @@ function uc_node_checkout_type_form_subm $fields[] = $key; } } if ($form_state['values']['disable_preview']) { $fields[] = 'preview'; } variable_set('uc_node_checkout_'. $form_state['values']['type'] .'_restrictions', $fields); + variable_set('uc_node_checkout_'. $form_state['values']['type'] .'_message', $form_state['values']['product_message']); $form_state['redirect'] = 'admin/store/settings/node-checkout'; } diff -urp ../uc_node_checkout_clean/uc_node_checkout.module ./uc_node_checkout.module --- ../uc_node_checkout_clean/uc_node_checkout.module 2009-05-07 12:40:16.000000000 -0400 +++ ./uc_node_checkout.module 2009-05-07 12:40:01.000000000 -0400 @@ -380,6 +380,12 @@ function uc_node_checkout_form_alter(&$f $form[$field]['#access'] = FALSE; } } + + // Display a message so the customer isn't totally confused. + $msg = t(variable_get('uc_node_checkout_'. $type .'_message', t('This product requires some additional information.'))); + if($msg != ''){ + drupal_set_message(check_plain($msg)); + } // Redirect non-administrators to the shopping cart after edits. if (variable_get('uc_node_checkout_submit_redirect', TRUE) && !user_access('edit any '. $type .' content')) { @@ -397,10 +403,7 @@ function uc_node_checkout_form_alter(&$f } // Submit handler for add to cart buttons on node checkout associated products. -function uc_node_checkout_add_to_cart_submit(&$form, &$form_state) { - // Display a message so the customer isn't totally confused. - drupal_set_message(t('This product requires some additional information.')); - +function uc_node_checkout_add_to_cart_submit(&$form, &$form_state) { $get = array('product_nid='. $form_state['values']['nid']); // Pass the attributes selections in the URL.