OrderPlaced event

This event occurs after the order has been placed and stored in the database.  For example, you can use it to export information about the order outside of the Ecommerce module.

The handler method for this event must have the following definition:

private void EcommerceEvents_OrderPlaced(Guid orderId)
{
}

The method accepts the following arguments:

  • orderId
    Represent the ID of the order that has been placed. Based on this ID you can query information about the order or the customer who placed it.

Here is a code example of hooking up to the OrderPlaced event:

public class Global : System.Web.HttpApplication
{
    protected void Application_Start(object sender, EventArgs e)
    {
        Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
    }
 
    private void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
    {
        if (e.CommandName == "Bootstrapped")
        {
            EcommerceEvents.OrderPlaced += new EcommerceEvents.OnOrderPlaced(EcommerceEvents_OrderPlaced);
        }
    }
 
    private void EcommerceEvents_OrderPlaced(Guid orderId)
    {
        //Your custom logic
    }
}

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK