How can I get total price?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
Hi, everyone.
I would like to modify the form after I confirm an order and add some info about payment there.
I can get orderId but I don't know how to get OrderTotal.

public int getOrderId() {
    var orderCollection = NopContext.Current.User.Orders;
    var lastOrder = orderCollection[0];
    return lastOrder.OrderId;
}

Is there something similar for total price (OrderTotal)?

In other forms I found this tag, but it didn't works in my form.
What I have to do for working it?

<%#Server.HtmlEncode(PriceHelper.FormatPrice(Convert.ToDecimal(Eval("OrderTotal")), true, false))%>

I'm using ver. 1.9
Il y a 12 ans
Hi

Try something like this

Get the order:

Order order = this.OrderService.GetOrderById(orderId);


Get the ordertotal from Order:

decimal ordertotal = order.OrderTotal;

Br

TCH
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.