Bank Details in Confirmation Email

  • Posts: 8
  • Thank you received: 0
12 years 4 months ago #56401

Hi Nicholas,
I've read most of the forum on this subject for bank transfer payment options to include bank details in confirmation email but I'm not very good with code.I've tried inserting the code below in Systems-->Emails

if($data->order_payment_method=="banktransfer"){
echo "bank information";
}
and

$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->order_payment_id);
$payment->payment_params = unserialize($payment->payment_params);
echo $payment->payment_params->information;

This results in a blank screen during the final checkout process. Can you please tell me...

1. Which notification emails needs to be changed at System-->Emails?
2. Where exactly to place the code? I know you mentioned 'somewhere below' but can you show an exact position with code?

Thanks :)

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 4 months ago #56470

If you get a blank page, it means that you're editing the correct email ;)
It also means that you didn't add your code properly in the email.
You can place completely at the end BUT you need to add php tags if you want it to work... So it should be like that:
<?php
$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->order_payment_id);
$payment->payment_params = unserialize($payment->payment_params);
echo $payment->payment_params->information;
?>

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
12 years 3 months ago #58594

Hi Nicolas, sorry for this late response.

So I went back to ORDER_CREATION_NOTIFICATION_SUBJECT at Systems--->Emails and add the code at the bottom and no blank screen but still no bank details :whistle:

if(!$app->isAdmin()){
echo JText::_('ORDER_VALID_AFTER_PAYMENT')."\n\n";
echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE)."\n\n";
}
echo str_replace('<br/>',"\n",JText::sprintf('BEST_REGARDS_CUSTOMER',$mail->from_name));?>
<?php
$paymentClass = hikashop::get('class.payment');
$payment = $paymentClass->get($data->order_payment_id);
$payment->payment_params = unserialize($payment->payment_params);
echo $payment->payment_params->information;
?> "

File Attachment:

File Name: bankdetails.docx
File Size:81 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
12 years 3 months ago #58604

Nicolas, just edited the language files since I only have one payment method - bank transfer as follows ORDER_VALID_AFTER_PAYMENT="Your order will be processed as soon as we receive your payment.<br/><b>The Bank Name</b> <br/>
Subname<br/>
Account Number: XXXXXXXXX <br/>
IBAN: XXXXXXXXXXXXXX <br/>
BIC: XXXXXXX <br/>
<br/>"

So that seems to add the bank details to the confirmation email. Can you tell me if this will work generally for all email including outlook etc.

Last edit: 12 years 3 months ago by Leilu.

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #58682

Yes that way is good too in your case.
It will work the same for all mail clients.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum