SimpleCart SimpleCart 2.x Frontend Checkout My Orders
SimpleCart hooks into the user management provided by MODX. This allows you to add an account section to your website where the user can view their past orders.
SimpleCart does not provide the login functionality; instead it is assumed you use the Login extra for setting up this secure area on your website.
Assigning orders to users
If a customer is logged in when they place an order, it will be automatically assigned to their account.
Once you have your members-only area set up in MODX, you can add a page that lists the users orders with the scGetOrders snippet.
All you need is the following snippet call.
This will get the orders for the currently logged in users, and includes an order detail page as well. For customising the output, see the scGetOrders documentation.
Bind existing orders to a user
If a customer isn’t logged in when checking out, you can still bind an order to an account via the SimpleCart backend.
Find the order, right click it in the list, and choose Bind order to user in the context menu.
In the modal window you can search for the account it should be bound to. After saving that, the customer can view the order on the My Orders page when they’re logged in.