[Skip to main content](#vessel-content)

#   Order creation e-mail only with bank transfer

##

- **[Rixters](/forum/user/28762-rixters "View Rixters's Profile")**
- [![Rixters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28762.jpg)](/forum/user/28762-rixters "View Rixters's Profile") Topic Author
- [ Offline](/forum/user/28762-rixters)

Less More

- Posts: 209
- Thank you received: 14
-
-
-
- [](http://www.r2h.nl)
-

7 years 2 months ago [\#310341](#310341) by [Rixters](/forum/user/28762-rixters "View Rixters's Profile")  *[Order creation e-mail only with bank transfer](/forum/35-orders-management/898183-order-creation-e-mail-only-with-bank-transfer#310341 "-- 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!")* was created by *[Rixters](/forum/user/28762-rixters "View Rixters's Profile")*

-- 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](https://www.hikashop.com/forum/orders-management/873016-order-created-notification-but-only-for-bank-trans.html)

I created the following code: Code:

&lt;?php if($data-&gt;order_payment_method !== 'bank_transfer') $data-&gt;customer-&gt;user_email = ''; ?&gt;

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!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg5ODE4My1vcmRlci1jcmVhdGlvbi1lLW1haWwtb25seS13aXRoLWJhbmstdHJhbnNmZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

7 years 2 months ago [\#310346](#310346) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order creation e-mail only with bank transfer](/forum/35-orders-management/898183-order-creation-e-mail-only-with-bank-transfer#310346 "-- 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!")*

Hi,

Instead of $data-&gt;customer-&gt;user_email = ''; you should use $mail-&gt;published = false; in your code.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg5ODE4My1vcmRlci1jcmVhdGlvbi1lLW1haWwtb25seS13aXRoLWJhbmstdHJhbnNmZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rixters](/forum/user/28762-rixters "View Rixters's Profile")**
- [![Rixters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28762.jpg)](/forum/user/28762-rixters "View Rixters's Profile") Topic Author
- [ Offline](/forum/user/28762-rixters)

Less More

- Posts: 209
- Thank you received: 14
-
-
-
- [](http://www.r2h.nl)
-

7 years 2 months ago [\#310376](#310376) by [Rixters](/forum/user/28762-rixters "View Rixters's Profile")  Replied by *[Rixters](/forum/user/28762-rixters "View Rixters's Profile")* on topic *[Order creation e-mail only with bank transfer](/forum/35-orders-management/898183-order-creation-e-mail-only-with-bank-transfer#310376 "-- 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!")*

Just to be complete. Dit some tweaking af found a little error. The correct code to block the mail is:
Code:

&lt;?php if($data-&gt;order_payment_method !== 'banktransfer') $mail-&gt;published = false; ?&gt;

Just for everyone who needs this kind of feature!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg5ODE4My1vcmRlci1jcmVhdGlvbi1lLW1haWwtb25seS13aXRoLWJhbmstdHJhbnNmZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
