How to get Product Image from ordered Product or is there any way to display Order detail after Chec

Pritam Gupta asked on February 5, 2016 14:08

Hello, I want to display Order Summary after order is Order id,address,product image,qty,Unitprice& total price of order.

Is there any way to display Order detail after Checkout..? or How to get Product image from ordered product..?

Recent Answers

Dawid Jachnik answered on February 5, 2016 14:51

Hello, You need join table COM_SKU and COM_OrderItem to retrive the skuimagepath. You can display Order detail by custom query repeater.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on February 5, 2016 19:33 (last edited on December 10, 2019 02:30)

One thing I have done in the past that seems to work is to create a custom macro function which uses the orderid as a querystring parameter. Then I fetch the associated order and from that, you can build your own invoice, or fetch the kentico generated invoice. I then call the macro inside of a static html webpart.

The call itself looks like this:

{% BPMacros.BPReturnInvoice(QueryString.orderid) |(identity)GlobalAdministrator%}

The code that just returns the kentico invoice(another option would be for you to create your own knock off invoice if you need the images and other items):

 /// <summary>
/// Returns string with Invoice
/// </summary>
/// <param name="context"></param>
/// <param name="parameters"></param>
/// <returns></returns>
[MacroMethod(typeof(string), "Returns invoice as string", 1)]
[MacroMethodParam(0, "param1", typeof(int), "OrderID")]
public static object BPReturnInvoice(EvaluationContext context, params object[] parameters)
    int OrderID = ValidationHelper.GetInteger(parameters[0], 0);
    OrderInfo oi = OrderInfoProvider.GetOrderInfo(OrderID);
    if (oi != null)
        return oi.OrderInvoice;
        return string.Empty;

0 votesVote for this answer Mark as a Correct answer

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