Skip to main content

can I add the text provided after paying also in the email that is send?

More
9 years 2 months ago #274292 by ezomerdijk
I have a payment type "banktransfer" and I would like to add the text of the bank account information also in the email sent after selecting this payment type.

I cannot find this text in the translation. So how could I refer to it in the email section?

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

More
9 years 2 months ago #274313 by nicolas
Hi,

What text exactly do you want to add in the email ?

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

More
9 years 2 months ago #274342 by ezomerdijk
the text provided in the field "bank account information" of the payment type configuration of Hika.

Also see my attachment.

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

More
9 years 2 months ago #274351 by nicolas
That text is already in the email sent to the customer after the order is created.
You can see the code which does that in the preload of the email (when you edit it via the menu System>Emails):
Code:
ob_start(); if($data->cart->full_total->prices[0]->price_value_with_tax>0) echo '<p>' . JText::_('ORDER_VALID_AFTER_PAYMENT') . '</p>'; if(in_array($data->order_payment_method, array('banktransfer', 'check', 'purchaseorder'))) { $amount = $currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax, $data->cart->order_currency_id); $paymentClass = hikashop_get('class.payment'); $payment = $paymentClass->get($data->order_payment_id); $information = $payment->payment_params->information; if(preg_match('#^[a-z0-9_]*$#i',$information)){ $information = JText::_($information); } if($data->order_payment_method=='banktransfer'){ echo '<p>' . JText::sprintf('PLEASE_TRANSFERT_MONEY',$amount).'<br/>'.$information.'<br/>'.JText::sprintf('INCLUDE_ORDER_NUMBER_TO_TRANSFER',$data->order_number) . '</p>'; }elseif($data->order_payment_method=='check'){ echo '<p>' . JText::sprintf('PLEASE_SEND_CHECK',$amount).'<br/>'.$information.'<br/>'.JText::sprintf('INCLUDE_ORDER_NUMBER_TO_CHECK',$data->order_number) . '</p>'; }elseif($data->order_payment_method=='purchaseorder'){ echo '<p>' . JText::sprintf('PLEASE_SEND_PURCHASEORDER',$amount).'<br/>'.$information.'<br/>'.JText::sprintf('INCLUDE_ORDER_NUMBER_TO_PURCHASEORDER',$data->order_number) . '</p>'; } } else { if($data->cart->full_total->prices[0]->price_value_with_tax>0 && hikashop_level(1) && $config->get('allow_payment_button',1)) { $pay_url = 'index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url_itemid; if(empty($customer->user_cms_id) && !empty($data->order_token)) { $pay_url .= '&order_token='.urlencode($data->order_token); } $pay_url = hikashop_frontendLink($pay_url); if($config->get('force_ssl',0) && strpos('https://',$pay_url) === false) { $pay_url = str_replace('http://','https://',$pay_url); } echo '<p><a href="'. $pay_url .'">'.JText::_('PAY_NOW') . '</a></p>'; } } $content = ob_get_clean(); $vars['ORDER_SUMMARY'] .= $content;
So unless you changed that code, or removed the ORDER_SUMMARY tag from the HTML version of the email, that text will be in the email notification sent to the customer.

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

More
9 years 2 months ago #274420 by ezomerdijk
Ah, off course. The "problem" is that I sent a payment link when I have checked the order.

And after going to the payment page, the customer selects "banktransfer" and than get a "order status notification" email...

Pfoeh. Is there an easy way? besides from scanning the code from one email and pasting the right pieces to the other? (cause just copy and paste doesn't work).

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

More
9 years 2 months ago #274422 by nicolas
Hi,

It's that code that is important to display the information of the payment method:
Code:
<?php $paymentClass = hikashop_get('class.payment'); $payment = $paymentClass->get($data->order_payment_id); $information = $payment->payment_params->information; if(preg_match('#^[a-z0-9_]*$#i',$information)){ $information = JText::_($information); } echo $information; ?>
You should be able to add that in any HTML version of the order notification emails where you want it to be displayed.

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

Time to create page: 0.150 seconds
Powered by Kunena Forum