I followed the recommendations here: http://drupal.org/node/84421 to create a ticket.module from the tangible.module. Works for the most part. However, I need to be able to enter a setting to my new ticket.module. Here is the code I added (again, this is the tangible.module simply renamted to ticket with the shipping attributes line commented out).

/**
 * Implementation of hook_menu
 */
function ticket_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array('title' => 'ticket',
      'path' => 'admin/store/settings/ticket',
      'callback' => 'ticket_admin',
      'access' => user_access('administer store'),
      'type' => MENU_NORMAL_ITEM
    );
  }
  return $items;
} // ticket_menu

/**
 * Implementation of hook_settings().
 */
// function ticket_ec_settings() {
 function ticket_ec_settings() {
  drupal_set_title(t('Ecommerce ticket sales settings (%revision)', array('%revision' => '$Revision: 1.37.2.7 $')));
  $form['tickets']['ticket_descriptions'] = array(
    '#type' => 'textarea',
    '#title' => t('Specific descriptions to be e-mailed to ticket purchasers'),
    '#default_value' => variable_get('ticket_descriptions', ''),
    '#cols' => 45,
    '#rows' => 50,
    '#description' => t('Specify here the ticket product number (nid) and the nid of the node that
      contains the message to be sent to the purchaser of that ticket.
      <br>Structure your entries like this:
      <p><strong>(product nid)|(node nid)<br />98|99<br /></strong></p>
      <p>Note that you only enter the node nid and also note that a \'<strong>|</strong>\' separates the 
      ticket product nid from it\'s corresponding page node nid (which you must enter), 
      and a newline separates each entry.<br />')
  );

  return $form;
}

function ticket_admin() {
  $output = "<p>Ticket Admin</p>";
  return $output;
}

but, no settings option appears under admin->store->settings.

Can someone help? Thanks.

Comments

halfelven’s picture

Title: Create Settings Page for Module? » Create Settings Page for Module? .info?

Do you need a ticket.info file for this?

somebodysysop’s picture

Title: Create Settings Page for Module? .info? » Create Settings Page for Module?

Not for Drupal 4.7.

somebodysysop’s picture

Status: Active » Fixed

Never mind. I solved problem by un-installing then re-installing module. Apparently, that's when the configuration sets in.

Anonymous’s picture

Status: Fixed » Closed (fixed)