Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help needed for payment method in confirmation


Recommended Posts

Posted

Hi,

 

I have a payment module which uses a generated reference number. I generate that number with a function inside function selection(). In checkout payment page, I can add this number beside the module name and it shows fine as I made:

 

$selection = array('id' => $this->code,
                   'module' => MODULE_PAYMENT_TEST_TEXT_TITLE . "(" . $ref . ")",
                   'fields' => array(array('field' => tep_draw_hidden_field('REFERENCE', $ref))));

 

 

But in checkout confirmation page, at payment method it just only shows the module name since it uses:

$this->title

 

Where title is in class constructor:

$this->title = MODULE_PAYMENT_TEST_TEXT_TITLE;

 

I tried to use the generate function inside the class constructor. But the problem is as its a random generator, in checkout confirmation page it shows a different number.

 

So, is there any way I can show the same as it shows in checkout payment? I need this reference number to track orders easily from admin.

 

All suggestions are appreciated.

 

-Ronobi

Posted

Well, seems like either I was not clear or there is no suggestion! Anyway, the main thing is I like to see the same reference inserted in database and shows up in 'details' page of 'orders.php' of admin. Does it make more senses to help?

 

-Ronobi

Posted

Can you store that number inside the DataBase together with the order?

Then you just need to retrieve it from there.

And I think it will be usefull to have the number stored.

 

SGershon

If at first you don't succeed, you must be a programmer.

 

Tip Posted: Languageless Reviews

Posted
Can you store that number inside the DataBase together with the order?

Then you just need to retrieve it from there.

No, I could not insert the reference number into database during checkout_process in order to retrieve this later in admin. Any idea or suggestions?

 

-Ronobi

Posted

I tried by adding a new field into the order table of database, add that filed in the class file of order (this->info['my_ref']) and in the sql_array of checkout_process.php. But I still could not insert that reference number into the order table.

 

I used function process_button (), function after_process() and function selection() to insert the reference number into the database, but did not have luck yet! If anyone knows the right way, please suggest me!!

 

-Ronobi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...