My Orders for the customer login

giridhar Addagalla asked on October 11, 2018 07:19

Hi team, My requirement is that I need to provide the customer order details in his account section a link called my order, for this thing to achieve you have mentioned there is integration package for that to display my order, I am very thankful for that, my question is does it provide any UI also or I need to implement the User interface page for the customer and link that model for that is my question, and in chance is there any plugin or stuff is presented for this to achieve please let me know. thanks.

Recent Answers


David te Kloese answered on October 11, 2018 14:33

Are you creating a Portal Engine Website or MVC?

In case of Portal: Check out the following Dashboard widget as a starting point:

Image Text

And how it's implemented via the Customer module:

Image Text

In case of MVC:

have a look at the following API examples https://docs.kentico.com/api11/e-commerce/orders

1 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on October 12, 2018 06:01

Hi David te Kloese thanks for your reply, but this is an admin interface which you have mentioned, but I need to display my orders to my customer individually in his account section, that is what actually i need, And I am using v10 of ecommerce(MVC).

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on October 12, 2018 10:00

Check out the documentation on displaying and updating orders on mvc sites

there is a section on displaying a list of orders.

Customer currentCustomer = shoppingService.GetCurrentCustomer();

OrdersViewModel model = new OrdersViewModel()
{
    Orders = orderRepository.GetByCustomerId(currentCustomer.ID)
};
0 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on November 2, 2018 12:32

The site which i have got is not an MVC site, do you have any document for the non mvc site that uses for showing my orders.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on November 2, 2018 12:49

Ow you mentioned MVC.

Than use the regular API examples: docs.kentico.com/...Updatingmultipleorders

// Gets the customer's orders
var orders = OrderInfoProvider.GetOrders().WhereEquals("OrderCustomerID", customer.CustomerID);

// Loops through the customer's orders
foreach (OrderInfo order in orders)
{
    // get details from the order
    var itemPrice = order.OrderTotalPrice; // or any other order value
}
0 votesVote for this answer Mark as a Correct answer

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