I have one product that really needs a different receipt page than all of our other products. Customer's purchasing the product would only have the one item on their order. Because they are making multiple installment payments, a special receipt would be most helpful.
Is it possible to modify the navigationhelper or take another route?
Thanks in advance for your assistance.
Multiple Receipt Pages
Re: Multiple Receipt Pages
Give a try and modify your NavigationalHelper class's GetReceiptUrl method as below
Where 666 is product id for which you want to have a separate Receipt page. Secondly if you look at return statement under if statement then its redirect the customer to new receipt page if order contains product with id 666.
Code: Select all
public static string GetReceiptUrl(int orderId)
{
int orderNumber = OrderDataSource.LookupOrderNumber(orderId);
Order order = OrderDataSource.Load(orderId);
foreach(OrderItem orderItem in order.Items)
if(orderItem.OrderItemType == OrderItemType.Product && orderItem.ProductId == 666) // Where 666 is product id
return string.Format("~/Checkout/CustomReceipt.aspx?OrderNumber={0}&OrderId={1}", orderNumber, orderId);
return string.Format("~/Checkout/Receipt.aspx?OrderNumber={0}&OrderId={1}", orderNumber, orderId);
}
Re: Multiple Receipt Pages
Perfect. Thank you.