Summary of the products after checkout with images

giridhar Addagalla asked on November 8, 2018 09:48

Hi, I am creating a thank you page to show the user after checkout is done In that, i want to show the product images along with the summary of the products, which mean an indirect summary of cart, for that i have created a page in that i have added the code to get the order id and by using the order Id can i get the product details and images of the products. which mean that. public string GetOrderDetails() { var customer = CustomerInfoProvider.GetCustomerInfoByUserID(CurrentUser.UserID); if (customer != null) { OrderInfo order = OrderInfoProvider.GetOrderInfo(OrderId); if (order != null) { return Convert.ToString(order.OrderInvoice); } } return ""; } Here by using this i am getting the direct invoice only but I need to get products which are present under that invoice so that i can create a summary of the products to show for the user.

Recent Answers

David te Kloese answered on November 8, 2018 10:03

Once again, have a look at the API examples:

If you have an order you'll have to get the order items:

 if (order != null)
        // Gets items in the order
        var orderItems = OrderItemInfoProvider.GetOrderItems(order.OrderID);
        foreach (OrderItemInfo orderItem in orderItems)
                    // get SKU name
                    var name = orderItem.OrderItemSKUName;
2 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on November 9, 2018 13:06

Thanks for that but, I have problem while using pushing to the ui using cms repeater, where it accept only dataset and data table but this orderitems returns array of object which cannot be bind to repeater, is there any other way which we can bind the orderitems directly to the UI.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.