Going round in circles on this one.
I'm making my own order confirmation email by editing the .tpl file it uses.
I'm trying to put a line in at line 50 that attempts to insert the total into the BACs details
Here's the bit before and after the line (the line with $totals in)
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">
Please follow these instructions carefully<P ...>
Make your payment for £ <?php echo $totals['text']; ?> to the following bank account:<P ...>
Bank: TSB<BR ...>
It all appears in the email except the total. I just a pound sign - I'm working on the assumption that $totals is a variable. My knowledge of PHP is almost zero so It's vary likely I'm doing something really stupid.
Check my FREE extension - Frontend Admin Toolbar
http://www.opencart.com/index.php?route ... n_id=26059
For any inquiry or questions contact me at: abxweb[at]outlook[dot]com
I want to place the total order cost that is displayed on the confirmation email as detailed
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;">
Please follow these instructions carefully<P ...>
Make your payment for £ORDER TOTAL HERE to the following bank account:<P ...>
Bank: TSB<BR ...>
Account Name: <BR ...>
Sort Code: <BR ...>
Account Number: <BR ...>
Payment Referance: <?php echo $order_id; ?><P ...>
Once you have made your payment reply to this email so that we can confirm your payment has been made, as soon as we confirm your payment your goods will be shipped
</td>
http://forum.opencart.com/viewtopic.php?f=20&t=154251
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Code: Select all
$data['bank'] = nl2br(str_replace('{total}',$this->currency->format(max(0, $this->cart->getTotal())),$this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id'))));
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
nice thereartcore wrote:It does and above is adjusted for OC2Code: Select all
$data['bank'] = nl2br(str_replace('{total}',$this->currency->format(max(0, $this->cart->getTotal())),$this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id'))));

Code: Select all
bank_transfer_bank_
Code: Select all
bank_transfer_bank
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
In admin open up the bank transfer module and change your text to include the {total} at a strategic spot.
Something like:
Pay {total} immediately to:
Bankaccount number...
Thank you!
I dont want to display the total in the bank transfer window in open cart only in a second location in the confirmation email received by the customer
Does this make sense?
@ocart777: thanks!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Attachments
Capture.PNG (31.53 KiB) Viewed 2308 times
use the same method. search forwaynegrappler wrote:Im trying to get the total from the confirmation email bottom right into the part indicated with the red arrow, see attachment
Code: Select all
$comment .= $this->config->get('bank_transfer_bank' . $this->config->get('config_language_id')) . "\n\n";
Code: Select all
$comment .= str_replace('{total}', $this->currency->format($this->cart->getTotal()), $this->config->get('bank_transfer_bank' . $this->config->get('config_language_id'))) . "\n\n";
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
I dont understand how this will alter the order.tpl file to display the info im want
all the edit was made only for "catalog/controller/payment/bank_transfer.php"waynegrappler wrote:It still not working, is this the right file /www/catalog/controller/payment/bank_transfer.php
I dont understand how this will alter the order.tpl file to display the info im want
the mail was sent out because once payment confirm button clicked it will call the confirm function from this file then trigger the "addOrderHistory" function from "catalog/model/checkout/order.php" which will send the email using the order.tpl template(somebody please correct me if i am wrong)
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
The text from the admin bank transfer module - the instructions for customers to pay - is sent upon confirming.
All my mod does is add the current total by replacing the place holder {total} which you have to add to the description, with the cart total.
/admin/index.php?route=payment/bank_transfer
add the {total} placeholder in the text.
/catalog/controller/payment/bank_transfer.php
Change $data['bank...etc with ocart777's modified version for oc2.
Rrefresh modification cache maybe and it should work.
I'll write an ocmod for this tomorrow

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
I'll add it to the market for free later on
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Use the extension installer to upload the ocmod.xml and hit refresh 9n the modification page.
Done.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
This is the actual email received by the customer
Attachments
Capture.JPG (57.63 KiB) Viewed 2254 times
Tested and confirmed working on 2102
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Now i want to copy the total order amount to the line indicated in capture.jpg
I have installed the extension and placed the {total} in the bank transfer instruction and it does show the total with open cart on my site but still does not display in the line i want it to on the confirmation email received by the customer
what am i doing wrong, the ID mod i made was so simple
Attachments
Capture.JPG (57.63 KiB) Viewed 2249 times
Capture1.JPG (56.64 KiB) Viewed 2249 times
Users browsing this forum: No registered users and 58 guests