Forums / Managing Customers and Orders / Direct deposit @ checkout - How to add invoice number?

Direct deposit @ checkout - How to add invoice number?

Locked

Views: 1,485

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 Apr 2008, 2:08 PM
#1
atlantis69 avatar

atlantis69

New Zenner

Join Date:
Apr 2008
Posts:
8
Plugin Contributions:
0

Direct deposit @ checkout - How to add invoice number?

Hi all,

I would like to somehow reference the current order number during checkout so I can advise buyers to use the invoice number when they do a direct deposit for items so I can cross reference payments back to my orders database.
I've done some searching on here, but think that it may be beyond normal support scope.

Does anyone have any ideas on how I might be able to achieve this?

Thanks in advance.

21 Apr 2008, 2:14 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Direct deposit @ checkout - How to add invoice number?

You would need some extreme contortions to achieve this. There isn't an invoice number as such in Zen Cart. It's an order number.

But to avoid your database getting clogged up with abandoned orders, the order isn't created until the checkout is confirmed, so no order number is available until the checkout confirmation page.

I have seen payment modules that "guess" what the next order number would be. But if you have any amount of traffic on your site, that's a very dangerous approach.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

21 Apr 2008, 2:23 PM
#3
atlantis69 avatar

atlantis69

New Zenner

Join Date:
Apr 2008
Posts:
8
Plugin Contributions:
0

Re: Direct deposit @ checkout - How to add invoice number?

Hmm, that's fair enough I guess (that the order isn't created until complete).

I'll have to have a bit more of a think about how I'll approach this.
My entire site is direct deposit based, so I need to work out an efficient method of referencing orders when they are paid.

Is it possible to reference a customer ID instead? The same people order infrequently, so I could deal with only using their user ID for reference.

21 Apr 2008, 2:29 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Direct deposit @ checkout - How to add invoice number?

Once they've logged in, which they normally have to do to get into the checkout, you can use the variable $_SESSION['customer_id'] in your code to get at the customer reference.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

21 Apr 2008, 2:35 PM
#5
atlantis69 avatar

atlantis69

New Zenner

Join Date:
Apr 2008
Posts:
8
Plugin Contributions:
0

Re: Direct deposit @ checkout - How to add invoice number?

Thanks kuroi... I guess I need to ask how I use that reference.

I would like to use it in the dirbank.php file as follows:

  • define('MODULE_PAYMENT_DIRBANK_TEXT_EMAIL_FOOTER',
    "Please use the following details to transfer your total order value:\n\n" .
    "Reference customer number " customer_id " during your bank deposit for faster processing" .
    "\nAccount No.: " . MODULE_PAYMENT_DIRBANK_ACCNUM .*

How do I integrate your code into the customer_id part I've referenced above?

Many thanks!

21 Apr 2008, 3:50 PM
#6
atlantis69 avatar

atlantis69

New Zenner

Join Date:
Apr 2008
Posts:
8
Plugin Contributions:
0

Re: Direct deposit @ checkout - How to add invoice number?

Nevermind... managed to sort it out by looking at some PHP examples :)