Page 1 of 1

Making status of order editable

Posted: Mon Nov 02, 2015 7:15 am
by ninja
I am trying to make the status of an order editable/changeable from the admin interface.
As of now it is only read-only by default.

I have gone through other questions in the forum, some of them has advised to override the orderPresenter class, but in my version of broadleaf there is no such class.

Also in other suggestion they have mentioned to override the class orderImpl in the admin module, but I don't have any custom order class as of now. So please help me out to make this field editable.

Any help will be highly appreciated.

Thanks in advance

Re: Making status of order editable

Posted: Tue Jul 25, 2017 4:36 pm
by phillipuniverse
Just a heads up, the Broadleaf commercial edition has full Order Management capabilities that are not available in the community edition.

All of the Order attributes are set to readonly. This is because of an @AdminPresentation annotation on OrderImpl:

Code: Select all

@AdminPresentationMergeOverrides(
    {
        @AdminPresentationMergeOverride(name = "", mergeEntries =
            @AdminPresentationMergeEntry(propertyType = PropertyType.AdminPresentation.READONLY,
                                            booleanOverrideValue = true))
    }
)
public class OrderImpl ... {


You can override this further in XML to ensure that it's not readonly. Add the following to applicationContext-admin.xml:

Code: Select all

<mo:override id="blMetadataOverrides">
    <mo:overrideItem ceilingEntity="org.broadleafcommerce.core.order.domain.Order">
        <mo:field name="">
            <mo:property name="readonly" value="false" />
        </mo:field>
    </mo:overrideItem>
</mo:override>


The Broadleaf forums are being retired as a readonly archive of questions. For active discussions and questions, check out the broadleaf-commerce tag on Stack Overflow which is actively monitored by the Broadleaf team.