Try our conversational search powered by Generative AI!

Extend the OrderStatus

Vote:
 

Hi.

The purchase order can be one of next statuses: InProgress, Cancelled, Completed etc

How can I add a new status to this list? Maybe does Epi not support it?

Commerce Version 9.14.1

Best regards

#155433
Sep 16, 2016 18:48
Vote:
 

That's a string, you can change to any name, but in commerce manager it will fall to in progress.

#155438
Sep 16, 2016 21:11
Vote:
 

Hi Khan

Thank you for your replay.

Yes, I know about it and if I set new status as string value I can break workflows. But I am interested EPi have a legal way expanding this functionality or not.

I think no.

Best regards

#155473
Sep 19, 2016 9:17
Vote:
 

Hi,

Unfortunately no, .NET just does not allow extending enum - and we have nothing out of box to support extra OrderStatus(es), at least for now. We, however, will look into this to see if we can do something.

Regards,

/Q 

#155474
Sep 19, 2016 9:21
Vote:
 

Hi Quan Mai.

Thank you for your replay.

Probably you can give a advice. Which way should we use to set our status? set manually string value or add for example a flag?

Best regards

#155478
Sep 19, 2016 9:34
Vote:
 

Hi,

I'm not sure I understand your question, but generally you should use OrderStatusManager methods to handle statuses of Shipment and Order. Did you mean the custom statuses?

/Q

#155480
Sep 19, 2016 9:44
Vote:
 

I need to see my value here(field Status)

List

Best regards

#155481
Edited, Sep 19, 2016 9:49
Vote:
 

It's pretty tricky. The view is defined by Orders-List.xml, and that specific column is defined by OrderStatusTemplate. OrderStatusTemplate uses OrderStatusManager internally and will fall back to InProgress if the Status value is not a valid one.

So if you want to show your custom status there, you have to create your own OrderStatusTemplate.ascx control, which accepts custom Status value, then change Orders-List.xml to use your custom control.

Regards,

/Q

#155484
Sep 19, 2016 10:48
Vote:
 

Hi Quan Mai.

I implemented it as you said.

Best regards

#155522
Sep 20, 2016 9:27
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.