0

I am in a requirement for sending different email content while I create credit memo for a return process based on the payment method used while checkout.

For example: If a person placed order using paypal, while creating return (credit memo) in admin panel, I want to send credit memo email stating about that particular payment method (paypal here). If a person placed order using credit card, while creating return (credit memo) in admin panel, I want to send credit memo email stating about that particular payment method (credit card here).

So, basically there will be different transactional emails needs to trigger while creating credit memo based on the payment method used to purchase.

Can anyone help me in this !

0

You can achieve this with calling block in your email template.

You just have to call your block file in email template where you want to put dynamic content and pass the order object to that block. Then you can process the data in that block and return whatever you want from there.

Like :

{{block class="core/template" order=$order name="order_block" template="your template file path.phtml" area="frontend"}}
  • I am not sure how do we use this. I saw the same way being used in shipment_new.html but can you please tell me the way it is being used to render the details. – Anurag Khandelwal Sep 30 '16 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.