Postby jefffischer » Mon Jan 30, 2012 3:21 pm
Several things - we don't actually have a full OMS system built into the Broadleaf admin, but we do currently offer the ability to edit aspects of an order. Out-of-the-box, the admin is configured to allow read-only access to the order. This is why you are unable to edit any of the aspects of the order. We did this because we fully expect that each implementation will have customized OMS needs and will likely need to add additional buttons and functions to the interface (e.g. a custom return button for returning and refunding and item in an order). We won't know the backend requirements for each individual case ahead of time, so we've left it open ended and have left the interaction read-only by default.
It is easy enough to enable editing of the order by engaging in a simple Broadleaf Commerce admin customization. The ecommerce archetype provides a good example of an admin customization in general, so that would be a good place to start if you haven't worked on customizing the admin already. The archetype demonstrates customizing the product view in the admin. In your case, you would like to customize the order view (specifically the order presenter). Here are some general steps:
1) Create your own presenter implementation that extends OrderPresenter
2) Override bind(), make sure to call super.bind() and setReadOnly(false)
3) Create your own module implementation that extends CustomerCareModule
4) Override onModuleLoad(), make sure to call super.onModuleLoad() and register your presenter with the proper key name: org.broadleafcommerce.admin.client.presenter.order.OrderPresenter (refer to MyCompanyAdminModule in the archetype for a more specific code example)
That should be enough to allow you to edit a basic field on the order, like status. There are other SubPresentable instances in the OrderPresenter that have also been set to readOnly true that you would need to set to false if you want to edit things like order items, fulfillment groups, etc...
Of course, if this is your first admin customization, then there are a few other key files that are required to register your module extension. Again, the archetype is a good example of how this is done. I'm also attaching some preliminary documentation that we've written regarding the admin, its key components and basic customizations.
-
Attachments
-
- open_admin_documentation_v2.docx.zip
- (161.57 KiB) Downloaded 1333 times