How To ...?
Create event listeners
All event listeners will inherit from IEventListener<T> where T is a Zpider event.
Available events
All events are in the namespace Zpider.eShop.Web.Base.Plugins.Events
Name | Description |
---|---|
AddToCartBeforeSaveEvent | Fired when an item is added to the cart, but before the cart i saved |
AddToCartEvent | Fired after an item is added to the cart |
ClearCacheEvent | Fired when an admin clicks “Clear cache” |
LogonUserEvent | Fired when a user (or guest) is logged on |
NewUserBeforeSaveEvent | Fired before a new user is saved |
NewUserEvent | Fired when a new user is created |
OrderStep1Event | Fired in orderstep1 |
OrderStep2Event | Fired in orderstep2 |
PageLoadEvent | Fired for each page load |
PlaceOrderBeforeSaveEvent | Fired before an order is placed |
PlaceOrderEvent | Fired after an order is placed |
Example
This is the code behind the Trustpilot integration in Zpider. In this example we are listening for both the PageLoadEvent in order to inject a trustbox using the PageBuilderService and a PlaceOrderEvent to pass a copy of the order to Trustpilot so that they can send an invitation when the order is ready.