Extend order status
Describes how to extend order status in Optimizely Customized Commerce.
In previous Customized Commerce versions, OrderStatus and OrderShipmentStatus were enums, so could not be extended. In Customized Commerce 13, a breaking change converted OrderStatus and OrderShipmentStatus from enums to classes. As a result, you can no longer apply bitwise operations to instances of OrderStatus and OrderShipmentStatus.
To register a new OrderStatus:
OrderStatus.RegisterStatus(new OrderStatus(128, "WaitingForFeedback"));
To get all registered OrderStatuses, including built-in ones, use this code.
var statuses = OrderStatus.RegisteredStatuses;
Related blog post: New feature in Customized Commerce 13: Extendable OrderStatus and OrderShipmentStatus
Updated 9 months ago