Skip to main content

Bank transfer details

More
13 years 2 months ago - 13 years 2 months ago #114866 by watashi
Hello,

I am looking into the below part of code at SYSTEM -> EMAILS -> ORDER CREATION NOTIFICATION:
Code:
if($data->order_payment_method=="collectondelivery"){ echo JText::_('ORDER_COLLECT_ON_DELIVERY'); } else { echo JText::_('ORDER_VALID_AFTER_PAYMENT'); 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; } }

From the above code I understand that in case if payment method selected is BANKTRANSFER, then my customer has to receive message ORDER_VALID_AFTER_PAYMENT and payment details (bank name, bank account etc).
However, due to some reason, my customer does not get payment info to his e-mail. He only gets e-mail with ORDER_VALID_AFTER_PAYMENT message, but no bank details.
Can you kindly advice what might be the reason?

I have put necessary information here: SYSTEM -> PAYMENT METHODS -> BANKTRANSFER PLUGIN -> SPECIFIC CONFIGURATION section -> BANK ACCOUNT INFORMATION text box.

Do I have to put it somewhere else?

Regards
Last edit: 13 years 2 months ago by watashi.

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

More
13 years 2 months ago #114921 by nicolas
Replied by nicolas on topic Bank transfer details
Hi,

There is nothing else to do.
It should be automatic.
Nevertheless, you can simply add a line like below in your email code in order to display it in the email directly:
echo 'my bank details';

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

More
13 years 2 months ago #115000 by watashi
Replied by watashi on topic Bank transfer details
Hi Nicolas,

Thanks for reply. That is what I am going to do, however, this part of code does not work:
Code:
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; }

There is no text in my e-mail between ORDER_VALID_AFTER_PAYMENT and THANK_YOU_FOR_YOUR_ORDER.

If my bank details change in the future, I will need to remember to change it not only at the back-end, but also in e-mails. It is not a good solution.

A screenshot of banktransfer plugin is attached hereto. Any mistake in its configuration from my side?

Best regards,

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

More
13 years 2 months ago #115046 by Xavier
Replied by Xavier on topic Bank transfer details
Hi,

To check if you pass in the "if" condition you can add "echo $data->order_payment_method;" to see the value returned, and why it's not going in the if.

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

More
13 years 2 months ago #115147 by watashi
Replied by watashi on topic Bank transfer details
Hi,

That's a good idea!

I have amended the piece with break-points as following:
Code:
if($data->order_payment_method=="collectondelivery"){ echo JText::_('ORDER_COLLECT_ON_DELIVERY'); } else { echo JText::_('ORDER_VALID_AFTER_PAYMENT'); echo '<br />"'; echo $data->order_payment_method; echo '"'; if($data->order_payment_method=="banktransfer"){ $class = hikashop_get('class.payment'); echo "!1"; $payment = $class->get($data->order_payment_id); echo "-"; echo $payment->payment_params->information; $payment->payment_params = unserialize($payment->payment_params); echo "-"; echo "!2"; echo $payment->payment_params->information; echo "!3"; } }

Below is the result I've got in my e-mail:

"banktransfer"!1-
Ниже указан номер карты Приват Банка нашего сотрудника, на которую вы можете перечислить вышеуказанную сумму. Вы можете перечислить деньги через он-лайн систему Privat24, а также через банкомат или отделение Приват Банка (Карта отделений и банкоматов).

Номер карты: xxxx xxxx xxxx xxxx
Получатель: xxxx xxxx
-!2!3


Definitely, it goes into the "if" clause, but unserialize makes it blank...
What is the function of unserialize and why it removes the whole message. Does it hate Russian? :)

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

More
13 years 2 months ago #115169 by nicolas
Replied by nicolas on topic Bank transfer details
Hi,

It seems that you had previously override the email code before updating to the latest version which already unserialize that data before loading the email content.
In the latest version of HikaShop the information is not unserialized in the email anymore and if you do it, it create an error and empty the variable.

So you should indeed remove the unserialize there for it to work properly.
The following user(s) said Thank You: watashi

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

Time to create page: 0.302 seconds
Powered by Kunena Forum