I have a lease product which needs a contract and a credit check. Once the contract is in place I add a product for checkout to the shopping cart. This has been implemented. However, the customer can also circumvent the contract process and just add the product to the cart. Then I want him/ her to go to the contract page. I can subscribe to the addtocart event(), is there a way to subscribe to a checkout event so that I can redirect the customer to sign the contract before placing the order?
I am also looking how I can subcribe to a 'paid event' so that I know that I can start collecting monthly installments.
==> FOUND:
/// <summary>
/// Process order paid status
/// </summary>
/// <param name="order">Order</param>
protected virtual void ProcessOrderPaid(Order order)
{
if (order == null)
throw new ArgumentNullException("order");
//raise event
_eventPublisher.PublishOrderPaid(order);
//order paid email notification
if (order.OrderTotal != decimal.Zero)
{
//we should not send it for free ($0 total) orders?
//remove this "if" statement if you want to send it in this case
_workflowMessageService.SendOrderPaidStoreOwnerNotification(order, _localizationSettings.DefaultAdminLanguageId);
}
//customer roles with "purchased with product" specified
ProcessCustomerRolesWithPurchasedProductSpecified(order, true);
}
J.