Order creation e-mail only with bank transfer
7 years 1 month ago #310341
by Rixters
Order creation e-mail only with bank transfer was created by Rixters
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.11
-- PHP version -- : 7.3.x
-- Browser(s) name and version -- : Chrome
Hi,
I only want to sent an order created e-mail when the bank transfer is used. I found this post: www.hikashop.com/forum/orders-management...-for-bank-trans.html
I created the following code:
This code has to go on top in the order created e-mail template.
Is this still a valid way to sent the e-mail only on bank transfer skipping all others? Or is there an other smart way?
Regards!
-- Joomla version -- : 3.9.11
-- PHP version -- : 7.3.x
-- Browser(s) name and version -- : Chrome
Hi,
I only want to sent an order created e-mail when the bank transfer is used. I found this post: www.hikashop.com/forum/orders-management...-for-bank-trans.html
I created the following code:
Code:
<?php if($data->order_payment_method !== 'bank_transfer') $data->customer->user_email = ''; ?>
Is this still a valid way to sent the e-mail only on bank transfer skipping all others? Or is there an other smart way?
Regards!
Please Log in or Create an account to join the conversation.
7 years 1 month ago #310346
by nicolas
Replied by nicolas on topic Order creation e-mail only with bank transfer
Hi,
Instead of $data->customer->user_email = ''; you should use $mail->published = false; in your code.
Instead of $data->customer->user_email = ''; you should use $mail->published = false; in your code.
Please Log in or Create an account to join the conversation.
7 years 1 month ago #310376
by Rixters
Replied by Rixters on topic Order creation e-mail only with bank transfer
Just to be complete. Dit some tweaking af found a little error. The correct code to block the mail is:
Just for everyone who needs this kind of feature!
Code:
<?php if($data->order_payment_method !== 'banktransfer') $mail->published = false; ?>
Just for everyone who needs this kind of feature!
Please Log in or Create an account to join the conversation.
Time to create page: 0.163 seconds