to be able to create an order history page, you first need to force users to login before they can go through the order process.
when the order is stored in the orders table after being processed through the payment gateway, you would need to store the users ID in a column of the orders table to associate the order to the user account of the person that placed the order.
the order history section will have an orders page, this lists each orderr that has been placed, total of the order and other information along those lines, the order detail page would show a listing of the items that where purchased for a specific order.
for details on how to create the order history pages, see the following tutorials on the eCart support page:
Applying Register/Login to your checkout
Automatically populating checkout fields
Creating an Order History page