We are dealing with government schools who unless we setup new payment gateways (they are not allowed to use PayPal or have PayPal mentioned on the invoice) the invoice with banking details then goes to accounts department to be paid.
Pete
We are dealing with government schools who unless we setup new payment gateways (they are not allowed to use PayPal or have PayPal mentioned on the invoice) the invoice with banking details then goes to accounts department to be paid.
Pete
In that case you will need to modify
admin/invoice.php around lines 136-7 which shows this
to add the info that you want on the invoicePHP Code:
<tr>
<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
<td class="main"><?php echo $order->info['payment_method']; ?></td>
</tr>
Being in NZ, direct bank deposit accounts for about 50% of my sales, and have noticed two problems with it I would like some advice on before I just change it.
1/ There are no reference instructions shown, so it is hard to match payments with orders.
I believe that if I add the last line here that will add it to the email (but I haven't tested it yet because of issue 2)
From my research it seems the order number cannot be added to the checkout_confirmation page as it does not exist yet, and while people have suggested workarounds of getting the last order and adding one, that is an approximation that will fail at some point.Code:define('MODULE_PAYMENT_DIRBANKNZ_TEXT_EMAIL_FOOTER', "Please use the following details to transfer your total order value:\n\n" . "\nAccount No.: " . MODULE_PAYMENT_DIRBANKNZ_ACCNUM . // "\nRouting Number:" . MODULE_PAYMENT_DIRBANKNZ_ROUTING . "\nAccount Name: " . MODULE_PAYMENT_DIRBANKNZ_ACCNAM . "\nBank Name: " . MODULE_PAYMENT_DIRBANKNZ_BANKNAM . "\nReference: ".$zf_insert_id .
2/ Probably more significant, I had an issue a little while back where someone just deposited money into my account with no details and no order! It could be a worse problem, but there was nothing I could do other than wait until someone complained that they didn't get their order and then sort it out. Less than ideal. I was confused about how they had got my bank details without an order, and then it came to me - the customer followed the process to checkout_confirmation, got the bank details, made the deposit and then exited the process, leaving me with no information on the "order" they thought they made.
These two issues suggest to me that the best solution is to have the following process: checkout_confirmation page shows a message like "you have chosen bank deposit, the account details will be shown once your order is confirmed"
checkout_success shows the account details along with the order number.
Does this make sense or have I missed something important (happens a lot)
Oh, and thanks to everyone for their work on making this the rest of zencart, it quite simply makes the impossible possible!
Thanks for your advice.
Pat
The order number is part of the standard 'Order Confirmation' email - so the order number does in fact exist when the email goes out.
I only reveal the bank details in my 'Order Confirmation' email - they do not appear on any of my sites. So I never have this issue. They need to complete the order, get the email and there are the details.
This is the wording I have on the 'Order Confirmation' page (mysite.com/index.php?main_page=checkout_confirmation):
Cheers / FrankPayment Method:
Direct Bank Deposit - Australia
We will email you our bank details for the transfer of your total order value
Thank you for your order which will be processed as soon as we receive payment in our account.
@PatClay
My file includes/languages/english/modules/payment/dirbankaus.php (minus the header..):
Also try:Code:define('MODULE_PAYMENT_DIRBANKAUS_TEXT_EMAIL_FOOTER', "Please use the following details to transfer your total order value:\n\n" . "\nAccount No.: " . MODULE_PAYMENT_DIRBANKAUS_ACCNUM . "\nBSB Number: " . MODULE_PAYMENT_DIRBANKAUS_BSB . "\nAccount Name: " . MODULE_PAYMENT_DIRBANKAUS_ACCNAM . "\nBank Name: " . MODULE_PAYMENT_DIRBANKAUS_BANKNAM . //"\nSwift Code: " . MODULE_PAYMENT_DIRBANKAUS_SWIFT . "\n\n<b>Thank you for your order which will be processed as soon as we have received payment in the above account.</b>\n"); define('MODULE_PAYMENT_DIRBANKAUS_TEXT_TITLE', '<b>Direct Bank Deposit - Australia</b>'); define('MODULE_PAYMENT_DIRBANKAUS_TEXT_DESCRIPTION', '<div class="important"><br />We will email you our bank details for the transfer of your total order value<br />' . //"\nAccount No.: " . MODULE_PAYMENT_DIRBANKAUS_ACCNUM . //"\nBSB Number: " . MODULE_PAYMENT_DIRBANKAUS_BSB . //"\nAccount Name: " . MODULE_PAYMENT_DIRBANKAUS_ACCNAM . //"\nBank Name: " . MODULE_PAYMENT_DIRBANKAUS_BANKNAM . //"\nSwift Code: " . MODULE_PAYMENT_DIRBANKAUS_SWIFT . '<p><br />Thank you for your order which will be processed as soon as we receive payment in our account.<p><br /></div>');
instead ofCode:"\nReference: " .$zf_insert_id .
(note the space between " and .$zf_insert_id . )Code:"\nReference: ".$zf_insert_id .
Suggest you do a test order as customer using the codes above
Cheers / Frank
Thanks for your comments Frank.
My original post was not completely clear about the checkout steps, and they have different names in different areas of the screen (I am using cherry zen, and checkout without account, so that may have caused the differences), so I will try to clarify:
Step 4/5
Page: index.php?main_page=checkout_confirmation
Page title: Order Review
This is where the default setup shows the bank account details, but from what I have read, the order number has not been created yet, until someone clicks "confirm order" and moves to:
Step 5/5
index.php?main_page=checkout_success
Page title: Thank You! We Appreciate your Business!/Checkout Successful
At this point you actually have an order.
I have been doing some experimenting and have some answers, but none of them are good.
Doesn't add the order number to the email. I guess that the variable $zv_orders_id is not available to that page. Adding "global $zv_orders_id" doesn't work either.Code:define('MODULE_PAYMENT_DIRBANKNZ_TEXT_EMAIL_FOOTER', "Please use the following details to transfer your total order value:\n\n" . "\nAccount No.: " . MODULE_PAYMENT_DIRBANKNZ_ACCNUM . // "\nRouting Number:" . MODULE_PAYMENT_DIRBANKNZ_ROUTING . "\nAccount Name: " . MODULE_PAYMENT_DIRBANKNZ_ACCNAM . "\nBank Name: " . MODULE_PAYMENT_DIRBANKNZ_BANKNAM . "\nReference: " . $zv_orders_id . "\n\nThanks for your order which will ship immediately once we receive payment in the above account.\n");
I could just tell the customer to look it up, but that is a hassle for them and I think the less effort for customers, the more $ for me.
As far as the web pages go, I am thinking something along this line:
And then modify includes/templates/MY_TEMPLATE/templates/tpl_checkout_success_default.phpCode:define('MODULE_PAYMENT_DIRBANKNZ_TEXT_DESCRIPTION', '<BR>You have chosen to pay by direct deposit, our bank account details will be displayed on the next screen when you confirm your order.');
to check to see if the payment method was DIRBANKNZ and if so display the account details.
Unfortunately at this point I am stuck. I can see several people wanting to do similar things in the forums, but no notes about anyone actually succeeding. I can see arrays with the information I need, but any attempts at getting the information end up with error messages along the lines of "you obviously know nothing about php, arrays or classes, here is a banana, now go away" Or at least they seem that way to me
Any pointers would be appreciated.
Pat
I have had partial success:
Change dirbanknz.php to:
add the following to MY_TEMPLATE/templates/tpl_checkout_success_default.phpCode:define('MODULE_PAYMENT_DIRBANKNZ_TEXT_DESCRIPTION', '<BR>You have chosen to pay by direct deposit, our bank account details will be displayed on the next screen when you confirm your order.');
Still no luck on getting the order number on the emails though - several threads have asked about it, but no-one has published a solution.Code:?> <div class="content"> <?php IF ($order_summary['payment_module_code']=="dirbanknz") { echo "Please use the following details to transfer your total order value:\n\n" . "<BR>Account No.: " . MODULE_PAYMENT_DIRBANKNZ_ACCNUM . "<BR>Account Name: " . MODULE_PAYMENT_DIRBANKNZ_ACCNAM . "<BR>Bank Name: " . MODULE_PAYMENT_DIRBANKNZ_BANKNAM . "<BR>Reference: " . $zv_orders_id. "<BR>Thanks for your order which will ship immediately once we receive payment in the above account.<BR>"; } ?> </div> <?php
I have now managed to get the emails to show the invoice number:
Change
languages/english/modules/payment/dirbanknz.php to
The reference number will be added after this, so you want the last line to be part of the bank details, not instructions.Code:define('MODULE_PAYMENT_DIRBANKNZ_TEXT_EMAIL_FOOTER', "Thanks for your order which will ship once we receive payment in the account below:\n\n" . "\nAccount No.: " . MODULE_PAYMENT_DIRBANKNZ_ACCNUM . "\nAccount Name: " . MODULE_PAYMENT_DIRBANKNZ_ACCNAM . "\nBank Name: " . MODULE_PAYMENT_DIRBANKNZ_BANKNAM );
Add the following to /classes/order.php (code segment starts at about line 1060.
It isn't fully tested yet,, and I only send out plain text emails, but it gets the job done for me.Code:if (is_object($GLOBALS[$_SESSION['payment']])) { $cc_num_display = (isset($this->info['cc_number']) && $this->info['cc_number'] != '') ? /*substr($this->info['cc_number'], 0, 4) . */ str_repeat('X', (strlen($this->info['cc_number']) - 8)) . substr($this->info['cc_number'], -4) . "\n\n" : ''; $email_order .= EMAIL_TEXT_PAYMENT_METHOD ; $email_order .=EMAIL_SEPARATOR . "\n"; $payment_class = $_SESSION['payment']; $email_order .= $GLOBALS[$payment_class]->title . "\n\n"; $email_order .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : ''; $email_order .= ($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer . "\n" : ''; //addition to add invoice number as reference for bank details IF($_SESSION['payment']=="dirbanknz") { $email_order.="Reference: ".$zf_insert_id."\n"; }
If I have committed major sins in the "right way to do things in Zen Cart" please let me know. I hope that these help someone else.
Pat
Pat, let us know if this displays properly when sending html emails (theoretically it should...)
Cheers / Frank
Sorry Frank, reality is different to theory here.
It doesn't show the reference for the html emails, I am not sure why, but I send out text emails, so it does the job for me. I am sure someone who knows this better than I will be able to fix the html part
Bookmarks