Multiple Receipt Pages

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Multiple Receipt Pages

Post by BBHartley » Thu Sep 10, 2009 5:49 pm

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Multiple Receipt Pages

Post by mazhar » Fri Sep 25, 2009 11:35 pm

Give a try and modify your NavigationalHelper class's GetReceiptUrl method as below

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);
    }
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.

BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Re: Multiple Receipt Pages

Post by BBHartley » Thu Oct 01, 2009 9:13 pm

Perfect. Thank you.

Post Reply