4 replies [Last post]
grobot's picture
Offline
Joined: 04/12/2008
Juice: 289
Was this information Helpful?

I had a search around the forums, but couldn't find anything which documented this too clearly. So here's my contribution.

How do I include bank deposit details in the order confirmation email?

You need to create a custom notification template, and adjust it based on the payment method. We're using the bank deposit payment method (http://www.ubercart.org/contrib/2516), and if you aren't, you'll need to adjust the first line of the code below accordingly.

Notification templates are managed at Administer / Store administration / Configuration / Notification settings / Checkout.

The customer will receive an email as defined in the "Customer" notification here. The default notifications are stored in ubercart/uc_order/templates/ - "customer" is ubercart/uc_order/templates/customer.itpl.php

Duplicate this file to ubercart/uc_order/templates/my-customer.itpl.php - this made it appear as an option in the notification settings under "Customer checkout notification" as "my-customer"

Then add a block of code like this:

<?php if ( isset( $order->payment_method ) && $order->payment_method == 'bankdeposit' ) : ?>
              <tr>
                <td colspan="2">
<p>Please use the following details for a bank deposit (within YOUR COUNTRY HERE only)</p>
<p>Bank details are as follows:
<ul>
<li>Bank: YOUR BANK HERE</li>
<li>Branch: YOUR BRANCH HERE</li>
<li>Account No. : YOUR BANK A/C HERE</li>
</ul>
<p>When paying by bank deposit please make sure you have emailed orders@YOURSHOP.com the following information:</p>
<ol>
<li>Reference used for the deposit: (name used on your invoice)</li>
<li>Date of deposit: (xx/xx/xx - the date you made the deposit)</li>
<li>Amount deposited: ($[order-total] - the amount you deposited)</li>
<li>Your order number: ([order-link] - the order number shown in this email)</li>
<li>Bank deposited from: (name of your bank)</li>
</ol>
                </td>
              </tr>
<?php endif ; ?>

Feel free to customise that, of course - the above is just what we used at http://www.notebookcity.co.nz/

Once that's done, make sure you've chosen "my-customer" for the customer notification, save your settings, and go test it with a bank deposit purchase.

Hope this helps!

Giant Robot - for campaign, charity, ngo & online store solutions - www.giantrobot.co.nz

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15453
Re: Submitted docs: How do I include bank deposit details in the

Thanks for taking the time to write up this tutorial. Smiling I did just realize (and it's a shame) that the only place where we discuss editing invoices is the developer's guide... probably the last place the regular user would look.

I'm curious if you'd mind updating this to include a link to the docs:

http://www.ubercart.org/docs/developer/246/invoice_system

And posting it as a tutorial in the following section of the user's guide so it doesn't get lost in the forums. Just click the "Add child page" link and you can stick it in!

http://www.ubercart.org/docs/user/561/tutorials

btw, that's a sharp looking site! Do you have any estimate on the # of products in the catalog? It seems quite extensive.

grobot's picture
Offline
Joined: 04/12/2008
Juice: 289
Re: Re: Submitted docs: How do I include bank deposit details in

The absolute best thing about documenting stuff like this?

When you upgrade from 1.0 to 1.3, neglecting to preserve your local hacks, and then end up searching the forum with a nagging feeling that "I'm sure I've asked this question before" ...

Thanks Ryan. UC rocks Smiling I never answered your question - about 1800 products currently.

Suggestion: It would be super if UC supported themed templates for the .itpl files - I run a shared codebase, and would prefer to keep the customer notification for each site in the site's theme folder (or sites/sitename/files/ubercart) rather than in the ubercart module folder.

Giant Robot - for campaign, charity, ngo & online store solutions - www.giantrobot.co.nz

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15453
xurizaemon@drupal.org
xurizaemon@drupal.org wrote:

Suggestion: It would be super if UC supported themed templates for the .itpl files - I run a shared codebase, and would prefer to keep the customer notification for each site in the site's theme folder (or sites/sitename/files/ubercart) rather than in the ubercart module folder.

+1 - planned for Drupal 6 development, and there's a patch in the issue tracker at d.o that might do it for D5.

holly12's picture
Offline
Joined: 10/01/2010
Juice: 3
saving

What details are needed to deposit money in to a Halifax bank?

high interest savings account