Page 1 of 1

broadleaf commerce interface v1.5# adding a new field

Posted: Sun May 13, 2012 7:02 am
by pedo1982
Hello,

I'm Badr a software developer in a company at Paris, I would contact you about an issue that I found in the platform broadleaf commerce interface v1.5,

My goal is to add a new field named "QUANTITY" in Custmer care ==> order ==> Filter Criteria" (see the picture in attachement),
Here below the code that I insert in class OrderPresenter.java but It did not worked :(

public void setup() {
getPresenterSequenceSetupManager().addOrReplaceItem(new PresenterSetupItem("orderDS", new OrderListDataSourceFactory(), new AsyncCallbackAdapter() {
public void onSetupSuccess(DataSource top) {
setupDisplayItems(top);
((ListGridDataSource) top).setupGridFields(new String[]{"customer.firstName", "customer.lastName", "name", "orderNumber", "status", "submitDate","QUANTITY"});
getDisplay().getListDisplay().getGrid().sort("submitDate", SortDirection.DESCENDING);
}
}));

QUANTITY: a new field to display the quantity reserved by the customer in the table "blc_order_item"

Kindly to help me to solve this issue and tell me plase the classes java to modify in the both level (database and for adding the new field tab "Filter Criteria" in the interface ?

Many thanks for your help,
Best regards, Badr

Re: broadleaf commerce interface v1.5# adding a new field

Posted: Fri Jun 15, 2012 4:20 pm
by jefffischer
You're looking at the wrong grid. OrderItem already has a quantity field that is visible in the OrderItems tab. You would not add a field to the order datasource for a OneToMany relationship (like OrderItem). If it is a requirement for you to be able to have a custom filter that traverses a OneToMany relationship based on some criteria, then custom code would be required in both the client side and some custom persistence handlers.