Page 1 of 1
Enable editing Order in broadleaf commerce Admin
Posted: Tue Nov 05, 2013 4:09 am
by soeyannaing
Hello,
i want to able to edit order in broadleaf admin panel, and i tried with user permission and also by overriding presenter classes. But result is nothing. I have read this topics
viewtopic.php?f=13&t=646 and no solution found.
so, How did somebody solve this problem ?
Thanks!!!!
Re: Enable editing Order in broadleaf commerce Admin
Posted: Tue Nov 05, 2013 10:09 am
by phillipuniverse
What version of Broadleaf are you on?
Broadleaf out of the box does not support editing orders in the admin. You will likely have to override the metadata for OrderImpl, FulfillmentGroupImpl etc to make the fields editable.
Re: Enable editing Order in broadleaf commerce Admin
Posted: Mon Nov 11, 2013 6:07 am
by soeyannaing
I used broadleaf version 2.0.2.
Now i have solved this problem though i'm not sure that is the right way! I made 2 changes as below :
In Broadleaf OrderPresenter's bind() method, i have found this coding
......
if (!selectedRecord.equals(lastSelectedRecord)) {
lastSelectedRecord = selectedRecord;
if (selectedRecord.getAttributeAsStringArray("_type") == null){
formPresenter.disable();
} else {
formPresenter.setStartState();
getPresenterSequenceSetupManager().getDataSource("orderDS").resetPermanentFieldVisibilityBasedOnType(selectedRecord.getAttributeAsStringArray("_type"));
display.getDynamicFormDisplay().getFormOnlyDisplay().buildFields(display.getListDisplay().getGrid().getDataSource(), false, false, false, selectedRecord);
display.getDynamicFormDisplay().getFormOnlyDisplay().getForm().editRecord(selectedRecord);
}
changeSelection(selectedRecord);
}
.......
(1). In this condition " if (!selectedRecord.equals(lastSelectedRecord)) " , these two records are not equals although both information are exactly equals. (i though that might be different dataType) So, statements inside are never work. Therefore i removed this condition.
(2). And i changed editable parameter to true as this " display.getDynamicFormDisplay().getFormOnlyDisplay().buildFields(display.getListDisplay().getGrid().getDataSource(), false, true, false, selectedRecord); " (middle parameter)
Then i can update the order's information, nothing problems occurred.
" I assumed that is not the right way but i worked for me ", if anything you want suggestion on this ?
Thanks.
Re: Enable editing Order in broadleaf commerce Admin
Posted: Mon Nov 11, 2013 11:38 am
by phillipuniverse
Seems reasonable to me. There's not really a 'right' way to do this as it's completely unsupported. However you get it to work is fine.
By the way, the latest version of Broadleaf is 3.0.3-GA (3.0.4-GA to be released in the next couple of days) and the latest patch release in the 2.0 line is 2.0.7-GA. I strongly recommend upgrading to at the very least the latest Broadleaf patch release. Patch releases should be 'drop-in' releases meaning you should not have to perform any migration steps to use it.
Re: Enable editing Order in broadleaf commerce Admin
Posted: Tue Nov 12, 2013 4:44 am
by soeyannaing
Thanks for Advice ! But i developed too much in version 2.0.2 and it seems not very easier to transform latest updates for now. But sooner or later i will use latest version.
Now i have another problem! I want to show
Customer Attribute in Order Detail Tab as below picture

- Customer Attribute
- customerAttribute.png (12.82 KiB) Viewed 13460 times
!! Currently not only the Customer Attribute but also other related Customer's List (Attributes) are not shown.
How can i show this Customer Attribute Information ?
Thanks for helping!
Re: Enable editing Order in broadleaf commerce Admin
Posted: Fri Jan 03, 2014 2:36 am
by sattymish
phillipuniverse wrote:What version of Broadleaf are you on?
Broadleaf out of the box does not support editing orders in the admin. You will likely have to override the metadata for OrderImpl, FulfillmentGroupImpl etc to make the fields editable.
Hi Phillip,
I an using 3.0.7-GA version of Broadleaf. I am trying to achieve the exact same thing. I want to change the order status from within the order details page. Could you give me little more details how to go about it.
Thanks & Regards,
Satyam
Re: Enable editing Order in broadleaf commerce Admin
Posted: Mon Jan 06, 2014 12:14 am
by sattymish
Finally I got it working.
Here is the link that helped me -
viewtopic.php?f=13&t=2093&p=5870&hilit=status#p5887