- Posts: 92
- Thank you received: 3
can I add the text provided after paying also in the email that is send?
- ezomerdijk
-
Topic Author
- Offline
Less
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?
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.
9 years 2 months ago #274313
by nicolas
Replied by nicolas on topic can I add the text provided after paying also in the email that is send?
Hi,
What text exactly do you want to add in the email ?
What text exactly do you want to add in the email ?
Please Log in or Create an account to join the conversation.
- ezomerdijk
-
Topic Author
- Offline
Less
More
- Posts: 92
- Thank you received: 3
9 years 2 months ago #274342
by ezomerdijk
Replied by ezomerdijk on topic can I add the text provided after paying also in the email that is send?
the text provided in the field "bank account information" of the payment type configuration of Hika.
Also see my attachment.
Also see my attachment.
Please Log in or Create an account to join the conversation.
9 years 2 months ago #274351
by nicolas
Replied by nicolas on topic can I add the text provided after paying also in the email that is send?
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):
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.
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;
Please Log in or Create an account to join the conversation.
- ezomerdijk
-
Topic Author
- Offline
Less
More
- Posts: 92
- Thank you received: 3
9 years 2 months ago #274420
by ezomerdijk
Replied by ezomerdijk on topic can I add the text provided after paying also in the email that is send?
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).
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.
9 years 2 months ago #274422
by nicolas
Replied by nicolas on topic can I add the text provided after paying also in the email that is send?
Hi,
It's that code that is important to display the information of the payment method:
You should be able to add that in any HTML version of the order notification emails where you want it to be displayed.
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; ?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.150 seconds