Magento – Send Specific Email Depending On Payment Method (i.e. to include Bank Details)

email-templatespaymenttransactional-mail

I need to send a specific email if the customer selects a payment method.

I will be using this for clients who wish to pay offline (Bank transfer) The email will inform them of our banking details.

Best Answer

If you can modify that specific payment method / module you use, it should be enough to set the property $_infoBlockType of your payment class and create a block which renders the necessary information.

Basically this block would just make a ->setTemplate() call in the constructor and then reference to your custom .phtml file with the infos.

Remark: Concerning bank transfer there are also ready-made & free extensions (I know about https://github.com/therouv/Magento-DebitPayment and Phoenix_BankPayment - but did not use them so far) which you might want to use directly, get inspiration or adapt them to your specific needs.