Bank details in email - bank transfer plugin

  • Posts: 254
  • Thank you received: 2
  • Hikashop Business
7 years 5 months ago #20596

Hi,

when a person chooses to pay by transfer it would be very very useful if the bank details that are displayed at the checkout are also sent in the order confirmation email? Is there are easy way to do this?

Thanks, James

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

  • Posts: 64169
  • Thank you received: 9262
  • MODERATOR
7 years 5 months ago #20623

Not automatically. You would have to edit the code of the email via the menu System->Emails and add something like that:
if($data->order_payment_method=="banktransfer"){
echo "bank information";
}

The following user(s) said Thank You: Maurice

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

  • Posts: 254
  • Thank you received: 2
  • Hikashop Business
7 years 5 months ago #20652

Okay thanks for the pointer

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

  • Posts: 7
  • Thank you received: 0
7 years 5 months ago #21329

Hi,

Can you explain in detail about below;
I'm struggled to make it.
Thanks

nicolas wrote:

Not automatically. You would have to edit the code of the email via the menu System->Emails and add something like that:
if($data->order_payment_method=="banktransfer"){
echo "bank information";
}

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

  • Posts: 7
  • Thank you received: 0
7 years 5 months ago #21337

Hi Nicolas

Thx for quick prompt ..I was wondering where to add the pointer (if ($data->order_payment_method=="banktransfer"){
echo "bank information";
}) should that go in (email / form_param.php) ?
I would really appreciate if you could guide me please ..

Cheers
Tomo

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

  • Posts: 64169
  • Thank you received: 9262
  • MODERATOR
7 years 5 months ago #21343

Hi,

No, the email / form_param.php file is a view file that you're editing via the menu Display->Views.
You should edit the order creation/status/admin ntofication emails via the menu System->Emails (Business edition only).

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

  • Posts: 15
  • Thank you received: 0
5 years 7 months ago #102852

Hi,

Please is it possible to "echo" the field just filled in the bank transfer payment plugin ?

Thank youu

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

  • Posts: 64169
  • Thank you received: 9262
  • MODERATOR
5 years 7 months ago #102928

Hi,

It's possible with such code:

<?php
if($data->order_payment_method=="banktransfer"){
 $class = hikashop_get('class.payment');
 $payment = $class->get($data->order_payment_id);
 $payment->payment_params = unserialize($payment->payment_params);
 echo $payment->payment_params->information;
}
?>

The following user(s) said Thank You: Hátle

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

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
1 year 2 months ago #278721

The statement

if($data->order_payment_method=="banktransfer")
seems to be not working any more in hikashop 3.2.0

Any changes?

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

  • Posts: 64169
  • Thank you received: 9262
  • MODERATOR
1 year 2 months ago #278757

Hi,

That code is still valid.... however, it depends on where you add it and how.
In which email are you trying to add it and what code do you have around it ?

Note that since 4 years ago, the bank transfer details are automatically in the order notification email sent to the customer. So the customization mentioned on this thread is not necessary anymore.

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

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
1 year 2 months ago #278773

Hi Nicolas,

thank you for your support.

The code is / was in the order status notification. Should the bank transfer details be also included in this email? I just removed all customisations and the details are not there...

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

  • Posts: 64169
  • Thank you received: 9262
  • MODERATOR
1 year 2 months ago #278790

Hi,

No. The code to handle that is only in the "order created modification" since the "order status notification" email is sent after the order is confirmed (and thus already paid) normally.
So you'll still need to add custom code to the email if you want to add it in the "order status notification" email.
Note however that in that email, most of the times $data->order_payment_method doesn't exist as $data only contains the data of the order that are being modified. So in that email, you'll need to use instead $data->cart->order_payment_method as $data->cart contains all the order data.

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

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
1 year 1 week ago #283710

Hello

Could you please explain it more precisely, how to edit the "status confirmation" email, to add bank transfer infos.

Let me explain.
In Germany we have to send a first email, that informs the customer, that he made an order.
With the second email, we confirm the order and have to send the payment details.

Thanks in advance
Maurizio

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

  • Posts: 23114
  • Thank you received: 3581
  • MODERATOR
1 year 1 week ago #283727

Hello,

Like Nicolas explained ; The bank transfert details are currently only in the "order creation notification" email.
If you open that email ( HikaShop > System > Email) you will see in the "preload" part of the email the content ; it starts with:

if(in_array($data->order_payment_method, array('banktransfer', 'check', 'purchaseorder'))) {

The idea for your would be to remove the code from the email creation preload and copy it into the order status notification preloads.
But, please note that some modification would be required in that copy/pasted code since the structure of the data between the two emails is a bit different.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.131 seconds
Powered by Kunena Forum