Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Victor Bjørholm 58 posts 180 karma points
    Jul 28, 2020 @ 13:08
    Victor Bjørholm
    0

    Send multiple emails at time of purchace

    Hi Matt, I finally have my shop working. At least for Europe :D However I would like to be able to automatize the shipping inquiry email process. This would be an email sent at the same time as the order confirmation email, and almost containing the same information. Any ideas on how to proceed with this? I thought about doing it directly in the source code https://github.com/vendrhub/vendr-checkout, but I can't seem to find out where the email actually gets sent. Any input would be greatly appreciated :)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 28, 2020 @ 15:31
    Matt Brailsford
    100

    Hi Victor,

    Sure. Well for this you'd need to setup some event handlers to listen for the order being finalized and then send the email.

    You can find some docs on events here https://vendr.net/docs/core/1-2-0/key-concepts/events/ and a list of all available notofaction events to listen for here https://vendr.net/docs/core/1-2-0/reference/vendr-core-events/#vendrcoreeventsnotification-namespace (though you'll probably just want the OrderFinalizedNotification)

    In your handler, you can then use the IEmailTemplateService to fetch your defined email and then call emailTemplateService.SendEmail to actually send the email.

    Hope this helps

    Matt

  • Victor Bjørholm 58 posts 180 karma points
    Jul 31, 2020 @ 12:47
    Victor Bjørholm
    0

    Sorry about the late reply. But thanks a lot! Setting up the event handlers seems easy enough, but I wonder how the emailTemplateSevice is to be used? I can't seem to find much info about it in the docs, but maybe you have an example?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Aug 21, 2020 @ 10:33
    Matt Brailsford
    0

    Hi Victor,

    Sorry, I just realized I didn't reply to this. Were you able to find a solution, or do you still need an example?

    Matt

  • Victor Bjørholm 58 posts 180 karma points
    Aug 26, 2020 @ 09:51
    Victor Bjørholm
    0

    Hi Matt, Yes I figured it out. Thanks for getting back to me !

Please Sign in or register to post replies

Write your reply to:

Draft