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

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.

Youtube's new player : how to remove related videos appearing on embeds ?

Hi,

YouTube a released a new player which allows users to display other videos than the one originaly embedded.

In a post on YouTube's blog, they suggest to "attach a rel=0 parameter to the video. i.e. http://www.youtube.com/v/&rel=0" but it makes the video module quite angry.

I Need to develop a customized form

Hi I Need to develop a customized form.This form contains some text fields and radio buttons.Also i need to execute this form when i click on a link developed by the l()function or when click on link developed by menu() hook.

Who are using Advertisement, Could you show it on your website?

I downloaded the module before, but I am confuse if that's correct to show, I upload image and active the ads, but image havn't been displayed on page, that just show ad name, post time and post status like:

This advertisement is actively being displayed.

This advertisement has been active since .........

I don't like this, Can we remove post name, time..... only leave image or flash on my index page

Can anybody help me about this, I will appreciate that, really need your help, I have been stoped to develop my site due to this module

Pages

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