- Posts: 8
- Thank you received: 0
Bank Details in Confirmation Email
14 years 3 months ago #56401
by Leilu
Bank Details in Confirmation Email was created by Leilu
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
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.
14 years 3 months ago #56470
by nicolas
Replied by nicolas on topic Re: Bank Details in Confirmation Email
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;
?>
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.
14 years 2 months ago #58594
by Leilu
Replied by Leilu on topic Re: Bank Details in Confirmation Email
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;
?> "
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;
?> "
This attachment is hidden for guests.
Please log in or register to see it.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
14 years 2 months ago - 14 years 2 months ago #58604
by Leilu
Replied by Leilu on topic Re: Bank Details in Confirmation Email
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.
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: 14 years 2 months ago by Leilu.
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58682
by nicolas
Replied by nicolas on topic Re: Bank Details in Confirmation Email
Yes that way is good too in your case.
It will work the same for all mail clients.
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.174 seconds