Forums / Addon Payment Modules / Show order number in payment info section of order confirmation e-mail

Show order number in payment info section of order confirmation e-mail

Views: 2,651

Results 1 to 5 of 5
15 Feb 2017, 6:47 PM
#1
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Show order number in payment info section of order confirmation e-mail

When a customer chooses to pay using Direct Bank Transfer, the order e-mail confirmation shows the bank code, swift code, etc. they need to use. I have added a field there called reference number that they should use when sending the transfer. I would like the reference number to be their order number. I have tried a few different things, but the order number doesn't show in the e-mail confirmation. This is what I currently have in includes/languages/english/modules/payment/dirbank.php:

define('MODULE_PAYMENT_DIRBANK_TEXT_EMAIL_FOOTER',
"Please use the following details to transfer your total order value:\n\n" .
"\nAccount No.: " . MODULE_PAYMENT_DIRBANK_ACCNUM .
"\nBSB Number: " . MODULE_PAYMENT_DIRBANK_BSB .
"\nAccount Name: " . MODULE_PAYMENT_DIRBANK_ACCNAM .
"\nBank Name: " . MODULE_PAYMENT_DIRBANK_BANKNAM .
"\nReference No: " . $zv_orders_id . );

I am just not sure what to use there to get the order number.

Thanks!

Danielle

15 Feb 2017, 7:38 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,885
Plugin Contributions:
20

Re: Show order number in payment info section of order confirmation e-mail

You've got a define in a define and trying to insert a result where the file is looking for another define.
Quick thought is to look at the file that defines the other MODULE_PAYMENT_DIRBANK_.... defines and define something like MODULE_PAYMENT_DIRBANK_BANKORDER as $zv_orders_id.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

15 Feb 2017, 8:09 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Show order number in payment info section of order confirmation e-mail

Or use a printf function and associated reference to echo the above definition.

Ie:

define('MY_CONSTANT', 'info to display and order_id: %s');

In presentation:

printf(MY_DEFINE, $zv_orders_id);

Reason is that language definitions are called before the associated data is made available, so basically the $zv_orders_id is null at the time the define is processed. The above was shown with a single variable; however, if there are two or more and it is designed to possibly use more than one language, then would want to use a sort of reference for each such use so that they can be resequenced within the define and the assigning printf function can remain unchanged.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Feb 2017, 8:50 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Show order number in payment info section of order confirmation e-mail

Consider this change I recommended in the AUS version of the Direct Bank Deposit module:
https://www.zen-cart.com/showthread.php?220590-Bank-Transfer&p=1325229#post1325229

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.