Hi Tyler,
Implementation of the post processing hook depends on your needs and how you want to utilize the post processing hook. I can give you a code sample that returns the customer and the orders associated with that customer. This is just one example of how you could use the post processing hook.
using
System;
using
Telerik.Sitefinity.Abstractions;
using
Telerik.Sitefinity.Modules.Ecommerce;
using
Telerik.Sitefinity.Modules.Ecommerce.Orders;
using
System.Linq;
namespace
SitefinityWebApp
{
public
class
Global : System.Web.HttpApplication
{
protected
void
Application_Start(
object
sender, EventArgs e)
{
Bootstrapper.Initialized +=
new
EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
}
void
Bootstrapper_Initialized(
object
sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
{
if
(e.CommandName ==
"Bootstrapped"
)
{
EcommerceEvents.OrderPlaced +=
new
EcommerceEvents.OnOrderPlaced(EcommerceEvents_OrderPlaced);
EcommerceEvents.PaymentResponse +=
new
EcommerceEvents.OnPostPaymentResponse(EcommerceEvents_PaymentResponse);
}
}
void
EcommerceEvents_PaymentResponse(Telerik.Sitefinity.Ecommerce.Payment.Model.IPaymentResponse paymentResponse)
{
//Write your own customizations
}
void
EcommerceEvents_OrderPlaced(Guid orderId)
{
OrdersManager ordersManager = OrdersManager.GetManager();
var order = ordersManager.GetOrder(orderId);
var customerId = order.Customer.Id;
var customer = ordersManager.GetCustomer(customerId);
var ordersOfACustomer = customer.Orders.ToList();
}
}
}
Please let us know if you have anymore questions.
Greetings,
Grace Hallwachs
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the
Telerik Public Issue Tracking system and vote to affect the priority of the items