Copied to clipboard

Flag this post as spam?

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


  • Philip Hayton 85 posts 411 karma points
    Aug 23, 2022 @ 10:31
    Philip Hayton
    0

    Custom events in the ActivityLog

    Hi Matt,

    I would like to show more events in the Activity Log on the order page:

    • A history of the emails that have been sent in relation to the order, along with the date/time and a badge indicating whether they we're sent successfully or not

    And this is a bit off piste, but:

    • A client has asked for the ability to update the order with several notes over the course of the order, and optionally send the client a notification when new notes are added, which is basically what they used to have in Mangento 1.

    It's straight forward enough to inject custom events into the ActivityLog, however it looks as though the raw DB entries are being converted into a format that the angular view can intepret, guessing it's the ActivityLogEntryMapper?

    Is that correct? And if so is there anyway of replacing or extending this class so that I can prep my custom events without having to rewire everything?

  • Matt Brailsford 3872 posts 20650 karma points MVP 9x c-trib
    Aug 23, 2022 @ 12:22
    Matt Brailsford
    0

    Hi Philip,

    1) We do fire a ActivityLogEntriesRenderingNotification event for which you can register a handler and tweak the mapped DTO's before they are sent to the UI. This should allow you to alter the labels and colours of the badges.

    2) The only thing we have is a single notes field which is stored as a property on the order. but you could register an OrderPropertiesChangedNotification handler to detect when that property has changed and then trigger sending of an email.

    The only other thing I could think of here is to maybe create a custom button that appears in the editor (the action buttons are extendable) that opens a custom angular dialog for your notes and store them in a custom table. You could then more easily control whether to send an email notification to the customer as those notes change.

    Hope this helps

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft