This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Book Modules

I don't like the Book Module because it is confusing to regular internet users. I see a few different book modules. Is there one I could use where I can click "add new chapter" or something simple and it adds a chapter?

Using Projects Module for Organic Groups Releases (not really for software)

First, we love the Projects Module. It's really setup well for file downloads.

That said, I really want to use the Projects module to organize our groups at Projects.Fightinjustice.org, so that group members can have tasks assigned to them, then have project releases, and everything else the Projects module offers.

First, the termonology is confusing for non software dude's.

Hidden Form Fields Not Displaying

Hello:

I'm attempting to add a hidden form field to a custom form, but am having no luck. It seems like it should be super simple--especially as all of my other fields are included in the form just fine. The code below shows all of the form fields and the hidden field tempid. But tempid is NEVER included in the form HTML. (SO FRUSTRATING!)

Any thoughts or ideas? Thanks for your help.

Andrew

Customizing E-commerce Invoices

I am having a little trouble solving a problem and would like to pick the brains of the e-commerce experts ;-)

First off I using Drupal 4.7

Ecommerce version is 2.1

As my clients do not process credit cards online, they use the COD payment type to complete the transaction and then contact the purchaser to finalize payment. They also have a Onfile payment type which I created which is just a clone of the COD Module so purchasers can indicate that they want to use a credit card that the site has on file.

I have had two requests from my clients... display the phone number on the invoice that is created in the store, as well as display the payment method.

I have solved the phone number problem but am having issues with displaying the payment method.

As far as I can tell the invoice is generated in the store.module in the function theme_store_invoice . Adding the output of the payment method would logically occur after the following line on or about line 337

$payment_info .= t('

Transaction ID: %txnid

', array('%txnid' => $trial ? t('Trial Invoice - Not Yet Posted') : $txn->txnid));

I have been spending the last couple of days familiarizing myself with the ecommerce modules' code but cant seem to see how to pull in the data contained in the field payment_method in the table ec_transaction

Data diagramming tool

This is not so much about Drupal, except this is for an upgrade to an existing site.

Does anyone know of a decent data diagramming tool to help me keep myself straight on the coding? I seem to have lost my copy of Visio. I'd prefer to keep this cheap, or better, free.

Autocomplete problem

I tried to make an autocompleted text field following this tutorial.

I did the following:

In my form:
$items['juego'] = array('#type' => 'textfield', '#title'=>t('Game').$req,'#autocomplete_path' => 'juego/autocomplete/','#size'=>'20','#maxlength'=>'100'/*,"#required"=>True*/,'#default_value' =>variable_get('juego', ""),'#description' => t('Name of the game to compete in'));

In the menu hook:

$items[] = array('path' => 'juego/autocomplete', 'title' => t('game autocomplete'),
      'callback' => 'juego_autocomplete', 'access' => user_access('access content'), 'type' => MENU_CALLBACK);

...And the handler function:

function juego_autocomplete($string) {
  $matches = array();
  $result = db_query_range("SELECT nombre FROM t_juegos WHERE LOWER(nombre) LIKE LOWER('%s%%')", $string, 0, 10);
  while ($juego = db_fetch_object($result)) {
    $matches[$juego->nombre] = check_plain($juego->nombre);
  }
  print drupal_to_js($matches);
  exit();
}

The problem is that when I type something into the text field, the handler is called but no string is passed to it, so the autocomplete returns all the possible options and not just the ones that match what I've typed.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions