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

Craft Commerce Notification Events #264

Open
BenParizek opened this issue Aug 6, 2023 · 4 comments
Open

Craft Commerce Notification Events #264

BenParizek opened this issue Aug 6, 2023 · 4 comments

Comments

@BenParizek
Copy link
Member

BenParizek commented Aug 6, 2023

Commerce has improved support of email triggers since the initial release.

Is this a place Notification Events can add value?

  • When a Craft Commerce order is completed
  • When a Craft Commerce transaction is saved
  • When a Craft Commerce order status is changed

The When a Craft Commerce order status is changed event could provide two template variables.

  • {order.number}
  • {{ object.order.number }}
  • {orderHistory.newStatus.name}
  • {orderHistory.prevStatus.name}
  • {{ object.orderHistory.newStatus.name }}
  • {{ object.orderHistory.prevStatus.name }}
@john-henry
Copy link

john-henry commented Oct 31, 2023

Hi @BenParizek, I take it this is not integrated with the beta of Sprout Email yet?

image

@BenParizek
Copy link
Member Author

It's not. Hope to have it in there before the non-beta release and that's waiting on me getting Sprout Forms out the door. Custom Events can be registered via EVENT_REGISTER_NOTIFICATION_EVENTS if you'd like to try to add something you need before I get to it and happy to answer questions around the API if I can be helpful there.

@BenParizek BenParizek added c4 and removed cX under consideration labels Nov 2, 2023
@BenParizek
Copy link
Member Author

@john-henry On second pass, based on my available time this year and the remaining plugins I need to get released on Craft 4, I'll probably be focusing on adding a Commerce feature set like these once I'm upgrading to Craft 5.

So for now, adding these as integrations via the EVENT_REGISTER_NOTIFICATION_EVENTS is probably the best way to go if you need them sooner. There are several examples of Notification Events in the codebase, all extending BarrelStrength\Sprout\transactional\notificationevents\NotificationEvent

@BenParizek BenParizek added cX under consideration and removed c4 labels Nov 4, 2023
@john-henry
Copy link

@BenParizek, I hear you! No problems. Thanks for response

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

No branches or pull requests

2 participants