on ‎2016 Apr 08 3:17 PM
I am currently using the 5.7 version of hybris. I have a requirement of attaching a pdf invoice to the email which is sent out after Order Confirm. How to proceed in this scenario?
A quick response to this would be highly appreciated.
Request clarification before answering.
Check this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
GenerateEmailAction.java is an action class. It will be called for all the businessProcess related to emails. So, I suggest not to modify this class.
Instead, modify your business process such that, inject an action between generateEmail and sendEmail. Your business process should look like this.
Action 1: generateEmail Action 2: attachDocument Action 3: sendEmail Action 4: removeSentEmail
Create a new action class (MyAttachDocument extends AbstractSimpleDecisionAction). In this class, implement your logic in executeAction method.
Declare this bean in your spring.xml as attachDocument.
Thanks Nithish. I have created one class: SendGenerateInvoiceEmailAction.java in which I have override the same method(executeAction) of GenerateEmailAction.java. I have created the class as: public class SendGenerateInvoiceEmailAction extends GenerateEmailAction
I have extended to GenerateEmailAction and now where and how We can declare the bean So that other business process will not get affected.
Hi,
The approach which I suggested is a bit different. Anyways, I think following will work in your approach (If you are using business process).
Update your businessprocess.xml like this.
action id='sendGenerateInvoiceEmail' bean='sendGenerateInvoiceEmail'>
And add the following in your core-spring.xml,
<bean id='sendGenerateInvoiceEmail' parent='abstractGenerateEmailAction' class='my.package.SendGenerateInvoiceEmailAction'>
<property name='frontendTemplateName' value='ForgottenPasswordEmailTemplate'/>
</bean>
I hope this works for you.
Hi Nithish, Can you tell me which catalog version I should use? In my case I called createEmalAttachment(with expected parameters) method but attachment is not coming in email. It works without attachment. Can you suggest anything else I have to do? Attachment is the my code snippet.link text
Hello Shaw, Can you tell me how to implement the process of sending mail ?i mean that how to write the code. Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
http://flexblog.faratasystems.com/index.php/ecommerce-with-hybris-sending-emails/
This might help you.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.