some progress on this one. So I found a similar thread: http://www.zen-cart.com/forum/showthread.php?t=22494

but there is one tricky part of the code I'm not able to handle or make complete sense out of it (see below) and includes at least this function tep_db_num_rows which is not compatible with zen...

so here comes the tricky part (from the oscommerce file):

////

function order_number() {
// Luottokunta vaatii tilausnumeron joka ei ole heidän järjestelmässään. Tietenkään oscommercen omaa tilausnumeroa ei voi
// laittaa koska tilausnumero määritellään vasta silloin kun tilaus on tehty. En halunnut luoda uutta taulua pelkästään luottokunnan takia
// joten päädyin omaan tilausnumerokärjestelmään joka käyttää olemassa olevia tietoja kuten asiakasnumeroa ja kuinka monta tilausta asiakas
// on tehnyt luottokunnan kautta. Luottokunnan tilausnumero ei saa alkaa nollalla ja saa olla max. 9 numeroa pitkä.

// Esimerkki:
// 1 00001 001
// |___|____|##########_ Yhdistetty tilausnumero kyseiselle asiakkaalle. Rajoituksena on 8999 tilausta / asiakas luottokuntaa käyttäen
// |
// |- Asiakas ID: asiakkaita voi olla max. 99999. Hitto, jos teillä on noin monta asiakasta, mitä te vielä tätä p*skaa OSC:tä käytätte! ;)

// Jos jollakulla on parempi idea, ilmoittakaa minulle :)
// Tämä ratkaisu ei kuitenkaan vaadi tietokantamuutoksia ollenkaan joten sen puolesta ihan toimiva systeemi.


$cid = str_pad($_SESSION['customer_id'], 5, "0", STR_PAD_LEFT);
$query = tep_db_query("SELECT date_purchased FROM ".TABLE_ORDERS." WHERE customers_id='".$_SESSION['customer_id']."' AND payment_method LIKE '%".$this->title."%'");
$numrows = strval(tep_db_num_rows($query)+1);
if ($numrows>999) {
$firstnum=1+$numrows{0};
$numrows=intval(substr($numrows,1));
} else {
$firstnum=1;
}


$numrows = str_pad($numrows, 3, "0", STR_PAD_LEFT);
$order_number = $firstnum.$cid.$numrows;
return($order_number);
}



////

Explanation of the finnish part goes something like this:

////

The credit processor needs a confirmation number which isn't registered in to their system. Ofcourse we can't use oscommerce order number because the number is defined after the order is made. I didnt want to create own table just for the credit processor so I decided to make own order number system which uses customer number and how many orders he has made through the system. Order number cannot begin with zero and can be 9 numbers long.
fex:
// Esimerkki:
1 00001 001
|___|____|##########_ Combined order number for customer in hand. Limit is 8999 orders by customer using this service
|
|- Customer ID: there can be max 99999 customers. If you have that many customers why do you still use *!#€** OSC for (!!!:))

This solution doesn't need any database changes so it works

////


Some zen guru please help. This mod would definitely come in need for the zen folks in Finland since it is one of the only and trusted payment option which we could use with the local bank. And I'm really dying for the module.

Thank you all.