Customers email content

  • Posts: 160
  • Thank you received: 8
3 years 10 months ago #319818

-- url of the page with the problem -- : www.luxminime.com
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18

Hi,

How can I add IBAN and BIC information to customers emails only when they choose this method of payment?

Regards,
Colin.

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

  • Posts: 160
  • Thank you received: 8
3 years 10 months ago #319822

Hi,

I'ts OK, I have sorted this out.

Thanks.

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

  • Posts: 17
  • Thank you received: 2
  • Hikashop Business
3 years 10 months ago #319912

Hi Colin,
I'm looking for the same thing, could you tell me how?
thanks, augusto

Crashbandi wrote: Hi,

I'ts OK, I have sorted this out.

Thanks.


- page with issue: www.puntobenesseresrl.it
- HikaShop Business 5.0.0
- Joomla version: 3.10.12.
- PHP 8.2.9
- Chrome Version 117.0.5938.149 (Build ufficiale) (x86_64)
Last edit: 3 years 10 months ago by gus.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #319916

Hi,

If you configure a payment method of the type "bank transfer" via the menu System>Payment methods, you'll see a "information" area where you can enter the necessary information (IBAN, BIC, etc) for the bank transfer. That will automatically be displayed at the end of the checkout, and in the email notification the customer will receive after the checkout.

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

  • Posts: 17
  • Thank you received: 2
  • Hikashop Business
3 years 10 months ago #320349

Dear Nicolas,

I've already configured that as you write.

In this post the OP asks for "e-mail notification". Sometimes happens that customers of mine call me because they have lost the page displayed with IBAN showed after checkout, and my question is:

is it possible, ONLY for customers that choose bank transfer, put in their notification mails the IBAN only if they choose Bank Transfer Payment?


- page with issue: www.puntobenesseresrl.it
- HikaShop Business 5.0.0
- Joomla version: 3.10.12.
- PHP 8.2.9
- Chrome Version 117.0.5938.149 (Build ufficiale) (x86_64)

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320395

Hi,

This is the code which displays that information in the preload section of the "order creation notification email:

$unpaid_statuses = explode(',', $config->get('order_unpaid_statuses', 'created'));
if(in_array($data->order_status, $unpaid_statuses) && !empty($data->order_payment_method) && $data->order_payment_method != 'collectondelivery') {
	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;
}
Adding that same code at the end of the preload section of the "order notification" email should add what you want to the order notification emails.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum