Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Comment in E-Mail Template #6

Closed
tknobi opened this issue Aug 23, 2017 · 5 comments
Closed

Display Comment in E-Mail Template #6

tknobi opened this issue Aug 23, 2017 · 5 comments

Comments

@tknobi
Copy link

tknobi commented Aug 23, 2017

Is it possible to display the comment in E-Mail Templates?

@tlygnersjo
Copy link

tlygnersjo commented Aug 30, 2017

+1 I've also got the same question. Is this possible @boldcommerce?

@boldsidney
Copy link
Contributor

@knoblochtobias , @tlygnersjo

Apologies for the late reply.

As for your question, we haven't done this on a live webshop, but displaying the comment in the New Order Confirmation Template should be possible. You can retrieve the comment with the code {{var order.getBoldOrderComment()}} and put it into your template.

Example implementation - Placing the comment at the bottom of the order-details table:
email_comment_implementation

The depend constraint ensures that everything in between will only get shown if the comment is found.

{{depend order.getBoldOrderComment()}}
    <tr>
        <td colspan="2">
            <h3>{{trans "Order Comment"}}</h3>
            {{var order.getBoldOrderComment()|escape|nl2br}}
        </td>
    </tr>
{{/depend}}

I've only tested this with the magento payment method Check / Money order.

Let me know if there are any issues with getting this to work

@tlygnersjo
Copy link

Thanks for your reply and a great explanation! @boldsidney

Sorry for my late response as well! I'll let you know if thats working.

@tzcccc
Copy link

tzcccc commented Nov 29, 2017

Thanks. Did work for me!

@ashvinimarwal
Copy link

Working Perfect
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@tzcccc @ashvinimarwal @tlygnersjo @tknobi @boldsidney and others